ID token and access token
OpenID Connect issues two kinds of JSON Web Token. They look alike and serve different purposes.
| ID token | Access token | |
|---|---|---|
| Answers | Who is the member? | What may the member access? |
| Purpose | Proof of authentication for the client application | Authorization to call protected resources and APIs |
| Content | Identity claims: unique identifier (sub), name, e-mail, and any configured custom attribute | Permissions: roles and the scopes requested by the client |
| Read by | The client application | The resource server, which validates it on each request |
| Lifetime | Short | Usually a little longer, renewable with a refresh token |
The ID token does not grant access to protected resources. The access token is meant for resource servers and should not be used by the client as a source of identity.
In Open ENT, the member's classes and organizations are added to both tokens. See Token attributes and Scopes.