Guest User

Untitled

a guest
Jan 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public void ConfigureServices(IServiceCollection services)
  2. {
  3. services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
  4. .AddJwtBearer(options =>
  5. {
  6. options.TokenValidationParameters = new TokenValidationParameters
  7. {
  8. ValidateLifetime = true,
  9. ValidateIssuerSigningKey = true,
  10. IssuerSigningKey = new SymmetricSecurityKey(
  11. System.Convert.FromBase64String(_configuration["ApproovTokenSecret"]))
  12. };
  13. });
  14.  
  15. services.AddMvc();
  16. }
Add Comment
Please, Sign In to add comment