Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8.0 incompatibility with SecurityTokenValidators #48

Closed
sherlock1982 opened this issue Nov 30, 2023 · 1 comment
Closed

.NET 8.0 incompatibility with SecurityTokenValidators #48

sherlock1982 opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sherlock1982
Copy link

SecurityTokenValidators are obsolete and needs to be replaced with TokenHandlers

Noticed it because I need to use JwtServiceValidationHandler separately like this:
options.SecurityTokenValidators.Clear();
options.SecurityTokenValidators.Add(new JwtServiceValidationHandler(serviceProvider));

Added this for now to remove when addressed SecurityTokenValidators:
options.UseSecurityTokenValidators = true;

.NET make a warning here:
warning CS0618: 'JwtBearerOptions.SecurityTokenValidators' is obsolete: 'SecurityTokenValidators is no longer used by default. Use TokenHandlers instead. To continue using SecurityTokenValidators, set UseSecurityTokenValidators to true. See https://aka.ms/aspnetcore8/security-token-changes'

@brunobritodev brunobritodev self-assigned this Dec 1, 2023
@brunobritodev brunobritodev added the enhancement New feature or request label Dec 1, 2023
@brunobritodev
Copy link
Member

PR #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants