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

Add AuthenticationSchemes parameter to Authorization attribute [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] #7076

Open
orlandommb opened this issue Apr 26, 2024 · 0 comments
Labels

Comments

@orlandommb
Copy link

orlandommb commented Apr 26, 2024

Product

Hot Chocolate

Is your feature request related to a problem?

hi @michaelstaib ! in my case a i got a asp.net core blazor server app, i mead the whole app is server rendered, i have a few apis implemented for basic usage im planning on using hotchocholate so i can make a client app and get rid of the server rendered components, but as of now i need to specify the [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] in the controllers so they can work with JWT and the blazor asp.net core identity authorization can work with the blazor components. i don't know if i explained the whole picture correctly, but the thing is i cannot set the JWT as default authorization Scheme as of now because that would disrupt the whole app authenticacion process and it would take a lo of code refactoring.

The solution you'd like

I think adding the AuthenticationSchemes parameter to Autorization attribute would be a life saver here.

@orlandommb orlandommb added the 🎉 enhancement New feature or request label Apr 26, 2024
@glen-84 glen-84 changed the title Add AuthenticationSchemes parameter to Autorization attribute [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] Add AuthenticationSchemes parameter to Authorization attribute [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants