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

How can I add custom claims ? #16

Closed
AbdoDabbas opened this issue Nov 9, 2016 · 3 comments
Closed

How can I add custom claims ? #16

AbdoDabbas opened this issue Nov 9, 2016 · 3 comments
Labels

Comments

@AbdoDabbas
Copy link

I'm trying to follow this sample:
https://github.com/openiddict/openiddict-samples/tree/master/samples/PasswordFlow
But how to add custom claims to the returned response ?
Not only serialize them in the token, I want them to be returned clearly in the response of the token request.

@kevinchalet
Copy link
Member

You can read https://blogs.msdn.microsoft.com/webdev/2016/10/27/bearer-token-authentication-in-asp-net-core/ for an example of how to do that (in the Implementing the Connect/Token Endpoint section)

@AbdoDabbas
Copy link
Author

AbdoDabbas commented Nov 9, 2016

Thanks for replying, I'll read it.
Another question please, what's the difference between what you implemented in this sample, and the OpenIddict server library which contains Authentication provider ?

This one I mean.

@kevinchalet
Copy link
Member

As mentioned in the README, OpenIddict is based on ASOS. It implements all the validation routines for you and adds a bunch of security constraints so you only have to care about validating the user password and returning an identity. Everything else is managed for you by OpenIddict.

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