For an explanation of the flow, see RemiliaNET login.
Endpoints
| Item | Value |
|---|
| Issuer | https://www.remilia.net/oidc/realms/remilia |
| Discovery | https://www.remilia.net/oidc/realms/remilia/.well-known/openid-configuration |
| Authorization | authorization_endpoint from discovery, https://www.remilia.net/oidc/realms/remilia/protocol/openid-connect/auth |
| Token and refresh | token_endpoint from discovery, https://www.remilia.net/oidc/realms/remilia/protocol/openid-connect/token |
| End session | end_session_endpoint from discovery, https://www.remilia.net/oidc/realms/remilia/protocol/openid-connect/logout |
| Revocation | revocation_endpoint from discovery |
| Public API | https://www.remilia.net/api/v1 |
Discovery gives the endpoint URLs and the signing keys. The discovery document
of the realm also lists grants and algorithms that RemiliaNET developer clients
do not use.
Supported flows
| Client type | Flow | Secret | Refresh token |
|---|
| Login | Authorization Code with Proof Key for Code Exchange (PKCE), method S256 | None | When the provider issues one |
| API key | Client Credentials | Client secret | None |
Implicit, Resource Owner Password, plain PKCE, and other grants that discovery
lists are not supported for these clients. The developer portal sets the API
scopes of each client. For more information, see
App permissions.
Login clients
| Operation | Requirement |
|---|
| Authorization request | response_type=code, scope=openid, a random state, and an S256 PKCE challenge. A random nonce ties an ID token to the request. The portal attaches the approved API scopes to the client. |
| Callback | The returned state matches the saved value before the code is used. |
| Code exchange | The original redirect_uri and the code_verifier go to the token endpoint. |
| API call | The access token goes to /api/v1 as a bearer token. An ID token identifies the user and does not authorize API requests. |
| Refresh | The most recent refresh token, if issued. A replacement refresh token replaces it. invalid_grant requires another login. |
| Logout | The app clears local tokens before it redirects to end_session_endpoint. |
Callback URLs
- A callback URL is registered exactly, with its scheme, port, and path.
- Use
https:// and a public host, such as https://myapp.example/callback.
http://, localhost, 127.0.0.1, [::1], a private address, and a name ending in .local, .localhost, .internal, .test, or .invalid are rejected.
- A username, a password, a
# fragment, and a * wildcard are rejected.
- A Chromium extension registers
https://<extension-id>.chromiumapp.org/callback.
- The authorization request and the code exchange send the same callback URL.
Authorization parameters
| Parameter | Value |
|---|
client_id | The client ID of the registered Login client |
response_type | code |
redirect_uri | A callback URL registered for the client, sent verbatim |
scope | openid. The client includes its approved remilia: scopes. |
state | A random value that the app saves before the redirect |
nonce | A random value that the app checks in a validated ID token |
code_challenge | The S256 challenge of the PKCE verifier |
code_challenge_method | S256 |
Token response
| Field | Meaning |
|---|
access_token | The bearer token for /api/v1 |
expires_in | The lifetime of the access token in seconds |
refresh_token | Renews the access token without another redirect. Login clients only, when issued. |
scope | The scopes issued with this token, separated by spaces |
id_token | The identity of the logged-in user. Login clients only. |
ID tokens
- An app validates an ID token with a maintained OIDC library before it uses the
claims.
- Validation checks the signature against the JSON Web Key Set (JWKS) of the
issuer.
- Validation checks the issuer, the audience, the expiry, and the saved
nonce.
- The account key is
(iss, sub) from a validated ID token. Display names,
handles, and email addresses can change.
- The discovery document lists possible claims. A response can omit a claim that
discovery lists.
API key clients
| Item | Value |
|---|
| Grant | client_credentials, with the client ID and the client secret |
| Token | An app-only access token for the endpoints that allow app-only access |
| User context | None |
| Refresh token | None |
| Secret storage | A trusted server or an operating system credential store. For more information, see API client secrets. |
Token refresh
| Item | Value |
|---|
| Grant | refresh_token, with client_id and the most recent refresh token |
| Success | Another access token, and a replacement refresh token when the issuer rotates it |
invalid_grant | The refresh token expired or was revoked. Another login is required. |
End-session parameters
| Parameter | Value |
|---|
client_id | The client ID of the Login client |
post_logout_redirect_uri | The return URL after logout. It matches a registered redirect URI exactly. |
id_token_hint | The id_token from the code exchange. Recommended. |