SHARE
TWEET

Untitled

a guest Jun 16th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Services.AddAuthentication(A =>
  2.         {
  3.             A.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
  4.             A.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
  5.         })
  6.         .AddJwtBearer(O =>
  7.         {
  8.             O.RequireHttpsMetadata = false;
  9.             O.SaveToken = true;
  10.             O.TokenValidationParameters = new TokenValidationParameters
  11.             {
  12.                 ValidateIssuerSigningKey = true,
  13.                 IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(AuthJWTPublicKey)),
  14.                 ValidateIssuer = false,
  15.                 ValidateAudience = false
  16.             };
  17.         });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top