🇫🇷 Français | 🇬🇧 English
During an authentication through LINLP, several elements are returned:
👉 This page explains their role and usage.
| Element | Role |
|---|---|
| id_token | Contains identity data (signed JWT) |
| access_token | Allows API calls |
| /userinfo | Allows retrieval of user data |
⚠️ The id_token must be retained by the partner.
👉 It constitutes:
👉 Indeed:
💡 This enables:
The id_token is a signed JSON Web Token containing:
A JWT is composed of 3 parts:
HEADER.PAYLOAD.SIGNATURE
{
"alg": "RS256",
"typ": "JWT",
"kid": "abc123"
}
{
"sub": "075ccece-6699-4c08-80ca-27a6af136b68",
"given_name": "Jean Pierre",
"family_name": "Dupont",
"preferred_username": "Martin",
"birthdate": "1990-05-10",
"email": "jean.dupont@mail.com",
"iat": 1710000000,
"exp": 1710003600,
"iss": "https://authent.lidentitenumerique.laposte.fr",
"aud": "client_id"
}
⚠️ The payload is readable A JWT is not encrypted, only signed.
⚠️ Never trust it without validation Always verify the signature.
The partner must:
The access_token:
👉 It should not be used directly to read user data.
Allows retrieval of user data through API:
GET /userinfo Authorization: Bearer access_token
{
"sub": "075ccece-6699-4c08-80ca-27a6af136b68",
"given_name": "Jean Pierre",
"family_name": "Dupont",
"email": "jean.dupont@mail.com"
}
| Criteria | id_token | /userinfo |
|---|---|---|
| Format | JWT | JSON |
| Signature | Yes | No |
| Usage | Authentication | User data |
⚠️ Retain the id_token It is verifiable proof of authentication.
⚠️ Always validate the JWT Signature + expiration are mandatory.
⚠️ Do not expose tokens Never on an unsecured frontend.
⚠️ Use HTTPS only Secure transport is mandatory.
⚠️ The access_token is sensitive Protect it like a password.
👉 Test the integration: