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

[API] Configure role claim #485

Open
thisIsTheFoxe opened this issue Feb 5, 2020 · 2 comments
Open

[API] Configure role claim #485

thisIsTheFoxe opened this issue Feb 5, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@thisIsTheFoxe
Copy link

Hi,

While implementing I noticed that TokenValidationClaimRole is only available in the Admin-UI Project.

The API authorization looks like this where JwtClaimTypes.Role defaults to "role". In many cases, however, the actual role claim may be different..? (at least in my case..)

Would be great if it was possible to also have something like TokenValidationClaimRole together with the already existing AdministrationRole in the API's appsettings.json to be able to configure admin-rights even better.. :)

@skoruba
Copy link
Owner

skoruba commented Feb 14, 2020

@skoruba skoruba self-assigned this Feb 14, 2020
@skoruba skoruba added the question Further information is requested label Feb 14, 2020
@thisIsTheFoxe
Copy link
Author

Exactly, but that only let’s you define the role-value.. the name (or key) of the role claim is JwtClaimTypes.Role which is the constant string "role".

Then again if #478 is the current idea, you would probably just have one setting file where you can specify both the role-claim and the actual role-value.. just as in the Admin project. ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants