dnx451 RC1 What happened to InMemorySymmetricSecurityKey?
<p>I've been trying to create and sign a JwtSecurityToken using a simple key. And after a lot of research it seems that all the examples I find use the <a href="https://msdn.microsoft.com/en-us/library/system.identitymodel.tokens.inmemorysymmetricsecuritykey(v=vs.110).aspx" rel="noreferrer">InMemorySymmetricSecurityKey</a> class but unfortunately this class doesn't seem to exist in the newest versions of the <em>System.IdentityModel</em> libraries.</p>

<p>These are the dependencies I'm using:</p>

<pre><code>"System.IdentityModel.Tokens": "5.0.0-rc1-211161024",
"System.IdentityModel.Tokens.Jwt": "5.0.0-rc1-211161024"
</code></pre>

<p>I also tried using it's base class <a href="https://msdn.microsoft.com/en-us/library/system.identitymodel.tokens.symmetricsecuritykey(v=vs.110).aspx" rel="noreferrer">SymmetricSecurityKey</a> but then I get the following exception when trying to create the token:</p>

<pre><code>"Value cannot be null.\r\nParameter name: IDX10000: The parameter 'signatureProvider' cannot be a 'null' or an empty object."
</code></pre>

<p>This is the code that throws the exception:</p>

<pre><code>public static string CreateTokenHMAC()
{
    HMACSHA256 hmac = new HMACSHA256(Convert.FromBase64String("test"));

    var key = new SymmetricSecurityKey(hmac.Key);

    var signingCredentials = new SigningCredentials(key, SecurityAlgorithms.HmacSha256Signature);

    JwtSecurityToken token = _tokenHandler.CreateJwtSecurityToken(new SecurityTokenDescriptor()
    {
        Audience = AUDIENCE,
        Issuer = ISSUER,
        Expires = DateTime.UtcNow.AddHours(6),
        NotBefore = DateTime.Now,
        Claims = new List&lt;Claim&gt;()
        {
            new Claim(ClaimTypes.Email, "johndoe@example.com")
        },
        SigningCredentials = signingCredentials
    });

    return _tokenHandler.WriteToken(token);
}
</code></pre>

<p><em>It's the first time I'm using JwtSecurityToken so my guess is that I'm probably missing a step somewhere</em></p>