title: How can I encrypt JWT Token in Web Api C#?
body: <p>My Jwt Token looks like below:</p>
  
  <p><code>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9leGFtcGxlLm9yZyIsImF1ZCI6Imh0dHA6XC9cL2V4YW1wbGUuY29tIiwiaWF0IjoxMzU2OTk5NTI0LCJuYmYiOjEzNTcwMDAwMDAsImV4cCI6MTQwNzAxOTYyOSwianRpIjoiaWQxMjM0NTYiLCJ0eXAiOiJodHRwczpcL1wvZXhhbXBsZS5jb21cL3JlZ2lzdGVyIiwidGVzdC10eXBlIjoiZm9vIn0.UGLFIRACaHpGGIDEEv-4IIdLfCGXT62X1vYx7keNMyc</code></p>
  
  <p>If I Copy the above JWT token and paste it in <a href="https://jwt.io/" rel="nofollow">https://jwt.io/</a> then the actual information is showing like this</p>
  
  <p><a href="http://i.stack.imgur.com/DFzIE.png" rel="nofollow">Image</a></p>
  
  <p>I want to encrypt the JWT token with no one can access my information in Web Api. So, I want to use any encryption algorithm, If so please provide me proper solution </p>
  
  <p>Here is my Startup.cs file to authorize JWT Token.</p>
  
  <pre><code>        // Api controllers with an [Authorize] attribute will be validated with JWT
  
          app.UseJwtBearerAuthentication(
              new JwtBearerAuthenticationOptions
              {
                  AuthenticationMode = AuthenticationMode.Active,
                  AllowedAudiences = new[] { audience },
                  IssuerSecurityTokenProviders = new IIssuerSecurityTokenProvider[]
                  {
                      new SymmetricKeyIssuerSecurityTokenProvider(issuer, secret)
                  }
              });
  
      }
  </code></pre>