Skip to content

API reference

OIDC reference

OpenID Connect (OIDC) endpoints, supported flows, request parameters, and token fields for RemiliaNET Login clients and API clients.

For an explanation of the flow, see RemiliaNET login.

Endpoints

ItemValue
Issuerhttps://www.remilia.net/oidc/realms/remilia
Discoveryhttps://www.remilia.net/oidc/realms/remilia/.well-known/openid-configuration
Authorizationauthorization_endpoint from discovery, https://www.remilia.net/oidc/realms/remilia/protocol/openid-connect/auth
Token and refreshtoken_endpoint from discovery, https://www.remilia.net/oidc/realms/remilia/protocol/openid-connect/token
End sessionend_session_endpoint from discovery, https://www.remilia.net/oidc/realms/remilia/protocol/openid-connect/logout
Revocationrevocation_endpoint from discovery
Public APIhttps://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 typeFlowSecretRefresh token
LoginAuthorization Code with Proof Key for Code Exchange (PKCE), method S256NoneWhen the provider issues one
API keyClient CredentialsClient secretNone

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

OperationRequirement
Authorization requestresponse_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.
CallbackThe returned state matches the saved value before the code is used.
Code exchangeThe original redirect_uri and the code_verifier go to the token endpoint.
API callThe access token goes to /api/v1 as a bearer token. An ID token identifies the user and does not authorize API requests.
RefreshThe most recent refresh token, if issued. A replacement refresh token replaces it. invalid_grant requires another login.
LogoutThe 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

ParameterValue
client_idThe client ID of the registered Login client
response_typecode
redirect_uriA callback URL registered for the client, sent verbatim
scopeopenid. The client includes its approved remilia: scopes.
stateA random value that the app saves before the redirect
nonceA random value that the app checks in a validated ID token
code_challengeThe S256 challenge of the PKCE verifier
code_challenge_methodS256

Token response

FieldMeaning
access_tokenThe bearer token for /api/v1
expires_inThe lifetime of the access token in seconds
refresh_tokenRenews the access token without another redirect. Login clients only, when issued.
scopeThe scopes issued with this token, separated by spaces
id_tokenThe 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

ItemValue
Grantclient_credentials, with the client ID and the client secret
TokenAn app-only access token for the endpoints that allow app-only access
User contextNone
Refresh tokenNone
Secret storageA trusted server or an operating system credential store. For more information, see API client secrets.

Token refresh

ItemValue
Grantrefresh_token, with client_id and the most recent refresh token
SuccessAnother access token, and a replacement refresh token when the issuer rotates it
invalid_grantThe refresh token expired or was revoked. Another login is required.

End-session parameters

ParameterValue
client_idThe client ID of the Login client
post_logout_redirect_uriThe return URL after logout. It matches a registered redirect URI exactly.
id_token_hintThe id_token from the code exchange. Recommended.