Session management endpoints for monitoring and controlling user sessions. Supports OpenID Connect Session Management for single sign-out and session state checking.
Base URL: https://idp.authpi.com — see the IdP API overview for the
supported flows, or try these endpoints in the interactive reference.
GET/{issuer_id}/check-session.htmlSession Check Iframe
Serves the HTML page for OpenID Connect Session Management (OIDC Session Management 1.0).
This endpoint returns an HTML page containing JavaScript that listens for postMessage events from the Relying Party (RP) to check if the user's session is still valid.
client_id and session_stateunchanged, changed, or errorIf the session state has changed, the RP should re-authenticate the user or refresh tokens.
Specification: OpenID Connect Session Management 1.0
| Name | Type | Required | Description |
|---|---|---|---|
issuer_id | string | Required | The unique identifier for the issuer/tenant |
| Code | Description | Schema |
|---|---|---|
| 200 | HTML page with session checking JavaScript | object |
POST/{issuer_id}/check-sessionValidate Session State
Validates a session state value against the current session (OIDC Session Management 1.0).
This endpoint is called by the check-session iframe to validate the session state. It computes the expected session state based on the current session cookie and compares it with the provided value.
The request origin must match one of the client's registered redirect URIs. This prevents malicious sites from checking session validity.
valid: true - Session state matches, session is unchangedvalid: false - Session state differs or session is invalidNote: This endpoint should not be called directly by applications. Use the check-session iframe instead.
| Name | Type | Required | Description |
|---|---|---|---|
issuer_id | string | Required | The unique identifier for the issuer/tenant |
Content type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
client_id | string | Required | The client ID that received the original session_state |
session_state | string | Required | The session_state value from the authorization response |
origin | string | Required | The origin of the requesting page (must match a registered redirect URI) |
| Code | Description | Schema |
|---|---|---|
| 200 | Session state validation result | object |
| 400 | Bad Request - The request is malformed or missing required parameters. | OAuthError |
| 401 | Unauthorized - Authentication is required or has failed. | OAuthError |
| 403 | Forbidden - The authenticated client or user lacks permission for this operation. | OAuthError |
| 404 | Not Found - The requested resource does not exist. | OAuthError |
| 422 | Unprocessable Entity - The request syntax is correct but the data cannot be processed. | OAuthError |
| 429 | Too Many Requests - Rate limit exceeded. | OAuthError |
| 500 | Internal Server Error - An unexpected error occurred. | OAuthError |
GET/{issuer_id}/sessionGet Session Information
Retrieves information about the current user's session.
This endpoint returns session metadata including authentication details, device information, and session status. Use this to:
Requires a valid access token with:
sid (session ID) claim presentaud) matching the session's client IDThe token's audience is verified against the session's client to prevent cross-client session access.
Returns session metadata excluding sensitive fields like tokens and internal identifiers.
| Code | Description | Schema |
|---|---|---|
| 200 | Session Information - Metadata about the user's current session. | SessionResponse |
| 400 | Bad Request - The request is malformed or missing required parameters. | OAuthError |
| 401 | Unauthorized - Authentication is required or has failed. | OAuthError |
| 403 | Forbidden - The authenticated client or user lacks permission for this operation. | OAuthError |
| 404 | Not Found - The requested resource does not exist. | OAuthError |
| 422 | Unprocessable Entity - The request syntax is correct but the data cannot be processed. | OAuthError |
| 429 | Too Many Requests - Rate limit exceeded. | OAuthError |
| 500 | Internal Server Error - An unexpected error occurred. | OAuthError |
POST/{issuer_id}/sessionGet Session Information
Retrieves information about the current user's session.
This endpoint returns session metadata including authentication details, device information, and session status. Use this to:
Requires a valid access token with:
sid (session ID) claim presentaud) matching the session's client IDThe token's audience is verified against the session's client to prevent cross-client session access.
Returns session metadata excluding sensitive fields like tokens and internal identifiers.
| Code | Description | Schema |
|---|---|---|
| 200 | Session Information - Metadata about the user's current session. | SessionResponse |
| 400 | Bad Request - The request is malformed or missing required parameters. | OAuthError |
| 401 | Unauthorized - Authentication is required or has failed. | OAuthError |
| 403 | Forbidden - The authenticated client or user lacks permission for this operation. | OAuthError |
| 404 | Not Found - The requested resource does not exist. | OAuthError |
| 422 | Unprocessable Entity - The request syntax is correct but the data cannot be processed. | OAuthError |
| 429 | Too Many Requests - Rate limit exceeded. | OAuthError |
| 500 | Internal Server Error - An unexpected error occurred. | OAuthError |