title: Decode Jwt Token using security Key System.IdentityModel.Tokens.Jwt 4.0.2
body: <p>Hi i am trying to decode a token with C# framework 4.6.1 using the nuget package System.IdentityModel.Tokens.Jwt version 4.0.2.206221351 but i am not able to getting this working.</p>
  
  <p>For version 5.4 this is the code i used:</p>
  
  <pre><code>   var token = "";
              var key = Encoding.ASCII.GetBytes("Key");
              var tokenHandler = new JwtSecurityTokenHandler();
              var jwtToken = (JwtSecurityToken)tokenHandler.ReadToken(token);
              if (jwtToken == null)
              {
                  return null;
              }
              IdentityModelEventSource.ShowPII = true;  // --&gt; Error Here
              var tokenParameters = new TokenValidationParameters()
              {
                  RequireExpirationTime = false,
                  ValidateIssuer = false,
                  ValidateAudience = false,
                  IssuerSigningKey = new SymmetricSecurityKey(key), // --&gt; Error Here
                  RequireSignedTokens = true
              };
              SecurityToken securityToken;
              var principle = tokenHandler.ValidateToken(token, tokenParameters, out securityToken);
              if (principle == null)
              {
                  return null;
              }
              ClaimsIdentity identity = (ClaimsIdentity)principle.Identity;
  </code></pre>
  
  <p>Errors:</p>
  
  <p>CS0103  The name 'IdentityModelEventSource' does not exist in the current context   </p>
  
  <p>CS0144  Cannot create an instance of the abstract class or interface 'SymmetricSecurityKey' </p>
  
  <p>What could i be missing? is it a different way?</p>