graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

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

Open orlandommb opened this issue 1 year ago • 1 comments

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 mean 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 avatar Apr 26 '24 18:04 orlandommb

I am in need for this as well and generally open to contributing the feature although I would require a little guidance, probably.

mvarendorff avatar Apr 20 '25 23:04 mvarendorff