Skip to main content
In an OIDC-based Authorization Grant flow, an RP (the client) requests specific information about the subject (user) from the issuer (authN server), and the issuer creates and provides an ID token to that RP. This token is a JSON Web Token (JWT), cryptographically signed by the issuer to guarantee its authenticity. Inside the encrypted payload are claims, which are pieces of data that the server provides to identify the subject: the subject’s name, a unique identifier, their email address, phone number, and such. Some of these claims are specified by the OIDC standard, but not every ID token will contain all claims. OIDC also defines certain scopes as granting access to particular pieces of claim data. As a JWT, an encrypted ID Token appears on the surface as just a long sequence of ASCII characters:
However, this is actually three separate base-64 encoded blocks, each separated by the period character. The first block is a JavaScript Object Signing and Encryption (JOSE) header. When decrypted, it indicates algorithm token type:
These values indicate that the signature uses the RSA256 algorithm, and that the name of the signature key (key-ID) is “rsa1”. The second code block, when decrypted, is the payload of user claims:
The fields are as follows: