Closed mac2000 closed 6 years ago
I personally use cookie auth, and jwt auth in the same website, as two different auth handlers.
Ultimately the auth handler needs to construct a ClaimsPrincipal
for the authenticated user.
JWT handler can do this from a JWT token. You would need to write your own handler to do this from a webforms auth cookie created by another site - and this library just helps with the decryption part so you can get access to the user details embedded within that cooke, and then create the ClaimsPrincipal as you see fit.
No samples that I know of. You should be able to find docs about writing an auth handler for webapi though.
Is there any examples of integration with dotnet core webapi (or mvc)?
If I understand things right we may:
There is way to many approaches to choose from, maybe someone may share their experience?
In our case we wish to have JWT based auth in our API but still auth users coming from legacy app by cookie