Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1.     public class MyJwtOptions : JwtBearerAuthenticationOptions
  2.     {
  3.         #region Constructors
  4.  
  5.         /// <summary>
  6.         /// Initializes a new instance of the <see cref="MyJwtOptions"/> class.
  7.         /// </summary>
  8.         public MyJwtOptions()
  9.         {
  10.             //TODO: As mentioned in the Authorisation service, we need to decide how we want to manage the Issuer and Audience.
  11.             const String issuer = "Tahoe";
  12.             const String audience = "audience";
  13.  
  14.             Byte[] keyByteArray = Helper.GetSigningKey();
  15.  
  16.             String key = Convert.ToBase64String(keyByteArray);
  17.  
  18.             this.AllowedAudiences = new[] {audience};
  19.             this.IssuerSecurityTokenProviders = new[] {new SymmetricKeyIssuerSecurityTokenProvider(issuer, key)};
  20.         }
  21.  
  22.         #endregion
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement