I want to know, what is the internal process to encrypt and decrypt a Bearer token used in OAuth2 and the code in Asp.Net Identity.
Once the server receives a token, it is able to retrieve the UserId, Roles, Claims and all properties inside it. So, how are Bearer tokens decrypted? What is encryption algorithm and the code used?
Where are you obtaining the token from? Tokens are seldom encrypted (sometimes they are), but they will always be encoded (and signed). OpenID (a protocol on top of OAuth2) uses JWT. OAuth2 (not OpenID) uses "opaque" tokens.
See http://jwt.io for libraries on decoding a JWT.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With