@faable/auth-sdk 2.7.40 → 2.7.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/spec/openapi.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "@faablecloud/auth",
5
5
  "description": "Auth Platform made by Faable. Manage Users and Roles",
6
- "version": "2.41.2",
6
+ "version": "2.42.0",
7
7
  "license": {
8
8
  "name": "private",
9
9
  "url": "https://faable.com/docs/platform/privacy-policy"
@@ -6012,6 +6012,155 @@
6012
6012
  "description": "LogMetadata",
6013
6013
  "default": {}
6014
6014
  },
6015
+ "Session": {
6016
+ "type": "object",
6017
+ "required": [
6018
+ "id",
6019
+ "user",
6020
+ "sid",
6021
+ "status",
6022
+ "last_seen_at",
6023
+ "expires_at",
6024
+ "account",
6025
+ "createdAt"
6026
+ ],
6027
+ "properties": {
6028
+ "id": {
6029
+ "type": "string",
6030
+ "description": "Session ID"
6031
+ },
6032
+ "user": {
6033
+ "anyOf": [
6034
+ {
6035
+ "$ref": "#/components/schemas/User"
6036
+ },
6037
+ {
6038
+ "type": "string"
6039
+ },
6040
+ {}
6041
+ ]
6042
+ },
6043
+ "sid": {
6044
+ "type": "string",
6045
+ "description": "OIDC session id. Every id_token minted for this session carries it as the `sid` claim; a back-channel or front-channel logout names the session with it."
6046
+ },
6047
+ "status": {
6048
+ "anyOf": [
6049
+ {
6050
+ "type": "string",
6051
+ "enum": [
6052
+ "active"
6053
+ ]
6054
+ },
6055
+ {
6056
+ "type": "string",
6057
+ "enum": [
6058
+ "revoked"
6059
+ ]
6060
+ }
6061
+ ],
6062
+ "description": "`active` or `revoked`. An active session whose `expires_at` is in the past has expired: nothing can refresh it any more, but the row stays for the history."
6063
+ },
6064
+ "ip": {
6065
+ "type": "string",
6066
+ "description": "Client IP at the last authentication."
6067
+ },
6068
+ "user_agent": {
6069
+ "type": "string",
6070
+ "description": "Raw `User-Agent` header at the last authentication."
6071
+ },
6072
+ "client": {
6073
+ "anyOf": [
6074
+ {
6075
+ "$ref": "#/components/schemas/Client"
6076
+ },
6077
+ {
6078
+ "type": "string"
6079
+ },
6080
+ {}
6081
+ ]
6082
+ },
6083
+ "connection": {
6084
+ "anyOf": [
6085
+ {
6086
+ "$ref": "#/components/schemas/Connection"
6087
+ },
6088
+ {
6089
+ "type": "string"
6090
+ },
6091
+ {}
6092
+ ]
6093
+ },
6094
+ "issuer": {
6095
+ "type": "string",
6096
+ "description": "Issuer URL the session was minted on."
6097
+ },
6098
+ "last_seen_at": {
6099
+ "type": "string",
6100
+ "format": "date-time",
6101
+ "description": "Last authentication or token refresh through this session. Each refresh slides `expires_at` 30 days from here."
6102
+ },
6103
+ "expires_at": {
6104
+ "type": "string",
6105
+ "format": "date-time",
6106
+ "description": "When the session stops being usable unless something refreshes it first."
6107
+ },
6108
+ "revoked_at": {
6109
+ "type": "string",
6110
+ "format": "date-time"
6111
+ },
6112
+ "revoked_reason": {
6113
+ "anyOf": [
6114
+ {
6115
+ "type": "string",
6116
+ "enum": [
6117
+ "admin"
6118
+ ]
6119
+ },
6120
+ {
6121
+ "type": "string",
6122
+ "enum": [
6123
+ "logout"
6124
+ ]
6125
+ },
6126
+ {
6127
+ "type": "string",
6128
+ "enum": [
6129
+ "user"
6130
+ ]
6131
+ }
6132
+ ],
6133
+ "description": "`admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device."
6134
+ },
6135
+ "account": {
6136
+ "type": "string",
6137
+ "description": "Object is related with this account"
6138
+ },
6139
+ "metadata": {
6140
+ "type": "object",
6141
+ "properties": {},
6142
+ "additionalProperties": true,
6143
+ "description": "SessionMetadata",
6144
+ "default": {}
6145
+ },
6146
+ "createdAt": {
6147
+ "type": "string",
6148
+ "description": "Session creation date"
6149
+ },
6150
+ "updatedAt": {
6151
+ "type": "string",
6152
+ "description": "Session updated date"
6153
+ }
6154
+ },
6155
+ "description": "Session"
6156
+ },
6157
+ "SessionMetadata": {
6158
+ "type": "object",
6159
+ "properties": {},
6160
+ "additionalProperties": true,
6161
+ "description": "SessionMetadata",
6162
+ "default": {}
6163
+ },
6015
6164
  "Customdomain": {
6016
6165
  "type": "object",
6017
6166
  "required": [
@@ -7242,7 +7391,7 @@
7242
7391
  },
7243
7392
  "ErrorCode": {
7244
7393
  "type": "string",
7245
- "description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (401): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `invalid_email` (400): The email address is not valid.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.",
7394
+ "description": "Machine-readable error code. One HTTP status per code.\n\n- `bad_request` (400): The request is malformed. `message` says what is wrong.\n- `validation_error` (400): The body, query or path failed schema validation. `details.issues` lists each failing field.\n- `unauthorized` (401): The request carries no valid credentials.\n- `payment_required` (402): The feature is not included in the current plan.\n- `forbidden` (403): The credentials are valid but do not allow this operation.\n- `not_found` (404): The resource does not exist in this account.\n- `method_not_allowed` (405): The HTTP method is not supported on this path.\n- `conflict` (409): The request conflicts with the current state of the resource.\n- `payload_too_large` (413): The request body exceeds the size limit.\n- `unsupported_media_type` (415): The `Content-Type` is not accepted by this endpoint.\n- `unprocessable_entity` (422): The request is well-formed but cannot be processed.\n- `too_many_requests` (429): Rate limit exceeded. Honour the `Retry-After` header.\n- `internal_error` (500): Unexpected server error. Retry later; the request id is logged.\n- `already_exists` (400): A resource with the same unique field already exists (for a user, usually `email`). `details.fields` names the field.\n- `invalid_id` (400): The id in the path is not a valid id for this resource.\n- `account_not_found` (404): No Auth Account matches the request (domain, header or token).\n- `invalid_query` (400): The `?query=` FaableQL expression could not be parsed.\n- `search_not_supported` (400): This resource does not support `?search=`.\n- `invalid_expand` (400): An `?expand=` path is not allowed on this resource.\n- `access_denied` (401): The caller may not access this row (ownership or machine-to-machine restriction).\n- `insufficient_scope` (403): The token lacks a scope this operation requires. `message` names it.\n- `team_required` (400): An Auth Account must belong to a project (team).\n- `account_limit_reached` (409): The project already has the maximum number of Auth Accounts.\n- `invalid_project_id` (400): The project id is not of the form `project_<hex>` or `team_<hex>`.\n- `account_transfer_refused` (409): The Auth Account cannot be moved to that project. `details.blockers` lists why.\n- `plan_required` (402): The setting requires a higher plan. `message` says which.\n- `not_logged_in` (401): There is no signed-in session for this request.\n- `session_already_revoked` (409): The session was already revoked.\n- `invalid_token` (401): The bearer token is missing, malformed, expired or has no subject.\n- `not_owner` (403): The caller may only perform this operation on their own user.\n- `user_suspended` (403): The user is suspended and cannot sign in or be modified.\n- `invalid_credentials` (400): The email/username or password is incorrect.\n- `login_denied` (401): A post-login Action denied the sign-in. `message` carries the reason it gave. On token grants it is a 403 with `error: invalid_grant`.\n- `signup_denied` (403): A pre-signup Action or an active block denied the sign-up. `message` carries the reason.\n- `client_credentials_denied` (401): An Action denied the client_credentials grant. `message` carries the reason.\n- `m2m_quota_exceeded` (402): The project used the machine-to-machine tokens its plan includes this month. Free is capped; Hobby and Pro are billed per token instead.\n- `signup_disabled` (403): Self-service sign-up is disabled on this connection.\n- `email_taken` (409): Another user in this account already uses that email.\n- `invalid_email` (400): The email address is not valid.\n- `same_email` (400): The new email is the same as the current one.\n- `user_has_no_email` (400): The operation needs an email but the user has none.\n- `password_too_weak` (400): The password does not meet the connection policy. `message` lists each unmet rule.\n- `invalid_password_hash` (400): The imported password hash cannot be read, or its cost is above what a login can afford. `message` names the field.\n- `weak_password_hash` (400): The imported password hash uses a fast digest (MD5, SHA-1, SHA-2) or a cost below the minimum. `message` says which.\n- `invalid_code` (400): The verification code is wrong, expired or already used.\n- `invalid_phone` (400): The phone number is not E.164 and could not be resolved with the account default country. Include the country code.\n- `phone_changed` (400): The phone on the user changed after the code was sent. Start again.\n- `phone_already_verified` (409): The user already has a verified phone; the number cannot be swapped from the screen.\n- `sms_unavailable` (409): This account cannot send SMS right now. The suffix says why: `sms_unavailable:plan`, `:quota`, `:provider`.\n- `sms_failed` (409): The SMS provider rejected the message.\n- `invalid_state` (400): The `state` is missing, expired, or does not describe a resumable step.\n- `state_mismatch` (401): The `state` belongs to another account, session, client or ceremony.\n- `invalid_ticket` (400): The ticket does not exist or is not the kind this endpoint accepts.\n- `ticket_used` (400): The ticket was already consumed.\n- `ticket_expired` (400): The ticket is past its expiry.\n- `ticket_not_found` (404): No ticket with that id belongs to this user.\n- `credential_not_found` (404): The user has no password credential on this connection.\n- `invalid_link` (400): The magic link is malformed.\n- `expired_link` (400): The magic link token was not found or has expired.\n- `invalid_otp` (401): The one-time password is wrong or expired.\n- `invalid_client` (400): The `client_id` in the request does not name a client of this account.\n- `client_not_found` (404): No client with that `client_id`.\n- `client_mismatch` (401): The client belongs to a different account.\n- `invalid_client_metadata` (400): Dynamic client registration rejected a field (RFC 7591). `message` names it.\n- `invalid_connection` (400): The connection does not exist, is disabled, or is not of the type this flow needs.\n- `connection_required` (400): No connection was given and the client has no `default_connection`.\n- `connection_misconfigured` (400): The connection is missing settings needed to talk to its provider.\n- `passwordless_unavailable` (400): No passwordless connection is configured or enabled for this client.\n- `ambiguous_connection` (400): Several connections match; pass `connection_id`.\n- `invalid_redirect_uri` (400): The redirect URI is not registered for the client.\n- `origin_not_allowed` (403): The request `Origin` is not in the client's Allowed Web Origins.\n- `audience_not_found` (403): The `audience` does not name an API registered in this account.\n- `system_resource` (403): The resource is managed by Faable and cannot be modified or deleted.\n- `invalid_request` (400): A required OAuth parameter is missing or two of them are incompatible. `message` says which.\n- `invalid_device_code` (400): The device or user code is invalid or expired.\n- `provider_error` (400): The upstream identity provider returned an error. The suffix is the provider’s own code, when it sent one: `provider_error:bad_refresh_token` (the user must re-authorize), `provider_error:incorrect_client_credentials` (our configuration, the user can do nothing). `details.provider_error_description` carries the provider’s sentence.\n- `identity_already_linked` (409): That external identity is already linked to another user.\n- `identity_link_denied` (409): That external identity cannot be linked to this user.\n- `identity_conflict` (409): The user already has a linked identity for this connection.\n- `identity_orphaned` (400): The identity pointed at a user that no longer exists; it was removed. Sign in again.\n- `no_provider_token` (400): The identity holds no provider access token.\n- `no_refresh_token` (400): The identity holds no provider refresh token, so it cannot be refreshed.\n- `action_unavailable` (401): The Action that paused this login is disabled or belongs elsewhere.\n- `login_flow_misconfigured` (500): The login flow of this account cannot run. `message` carries the node error.\n- `mfa_required` (403): The login needs a second factor that this flow cannot collect, or one is still pending on the session.\n- `step_up_required` (403): Confirm an existing factor before changing your factors.\n- `interaction_required` (403): An Action asked for a redirect on a non-interactive flow.\n- `passkey_login_disabled` (400): Sign in with a passkey is not enabled for this client.\n- `mfa_pending` (401): A second-factor challenge is pending; answer it before continuing.\n- `mfa_invalid_code` (401): The authenticator code did not verify.\n- `mfa_invalid_recovery_code` (401): The recovery code did not verify.\n- `too_many_attempts` (429): Too many wrong codes. Wait a few minutes and try again.\n- `too_many_login_attempts` (429): Too many failed sign-in attempts for this email or username from this network. Wait a few minutes and try again.\n- `totp_not_allowed` (401): This account does not accept authenticator apps.\n- `no_usable_factor` (400): The user has no confirmed second factor to challenge.\n- `factor_not_found` (400): No factor with that id belongs to this user.\n- `factor_already_confirmed` (400): The factor was already confirmed.\n- `invalid_factor` (400): The factor cannot be verified (no secret material).\n- `session_missing` (401): The session that started this login no longer exists.\n- `passkey_verification_failed` (400): The WebAuthn response could not be verified.\n- `no_passkey_enrolled` (400): The user has no passkey to sign in with.\n- `malformed_credential` (400): The WebAuthn credential is malformed.\n- `unknown_passkey` (401): The passkey is not enrolled for this user.\n- `invalid_passkey` (401): The passkey assertion did not verify.\n- `invite_not_found` (404): No invite with that id in this account.\n- `invite_used` (400): The invite was already accepted.\n- `already_member` (400): The user is already a member of the team.\n- `not_a_member` (404): The user is not a member of the team.\n- `role_not_found` (404): No role with that id in this account.\n- `invalid_role` (400): The role belongs to another account.\n- `flow_not_found` (400): The login flow does not exist in this account.\n- `revision_not_found` (404): The revision is not in the flow history.",
7246
7395
  "enum": [
7247
7396
  "bad_request",
7248
7397
  "validation_error",
@@ -7271,6 +7420,7 @@
7271
7420
  "account_transfer_refused",
7272
7421
  "plan_required",
7273
7422
  "not_logged_in",
7423
+ "session_already_revoked",
7274
7424
  "invalid_token",
7275
7425
  "not_owner",
7276
7426
  "user_suspended",
@@ -25467,6 +25617,13 @@
25467
25617
  "user_id": {
25468
25618
  "type": "string"
25469
25619
  },
25620
+ "skipped_identities": {
25621
+ "type": "array",
25622
+ "items": {
25623
+ "type": "string"
25624
+ },
25625
+ "description": "Connections named in `identities` that this tenant does not have (e.g. Apple from a Firebase export). The user was imported without them."
25626
+ },
25470
25627
  "error": {
25471
25628
  "type": "object",
25472
25629
  "required": [
@@ -49198,6 +49355,1037 @@
49198
49355
  }
49199
49356
  }
49200
49357
  },
49358
+ "/session": {
49359
+ "get": {
49360
+ "operationId": "session/list",
49361
+ "summary": "List Sessions",
49362
+ "tags": [
49363
+ "session"
49364
+ ],
49365
+ "description": "List Sessions",
49366
+ "parameters": [
49367
+ {
49368
+ "schema": {
49369
+ "type": "number",
49370
+ "minimum": 1,
49371
+ "maximum": 200
49372
+ },
49373
+ "in": "query",
49374
+ "name": "pageSize",
49375
+ "required": false,
49376
+ "description": "Number of items per page (max 200)"
49377
+ },
49378
+ {
49379
+ "schema": {
49380
+ "type": "string"
49381
+ },
49382
+ "in": "query",
49383
+ "name": "cursor",
49384
+ "required": false,
49385
+ "description": "Cursor for next page"
49386
+ },
49387
+ {
49388
+ "schema": {
49389
+ "type": "string"
49390
+ },
49391
+ "in": "query",
49392
+ "name": "next",
49393
+ "required": false,
49394
+ "description": "Cursor returned by the previous page"
49395
+ },
49396
+ {
49397
+ "schema": {
49398
+ "type": "string"
49399
+ },
49400
+ "in": "query",
49401
+ "name": "user",
49402
+ "required": false,
49403
+ "description": "Exact match on `user`. Equivalent to `?query=user:<value>`."
49404
+ },
49405
+ {
49406
+ "schema": {
49407
+ "type": "string"
49408
+ },
49409
+ "in": "query",
49410
+ "name": "client",
49411
+ "required": false,
49412
+ "description": "Exact match on `client`. Equivalent to `?query=client:<value>`."
49413
+ },
49414
+ {
49415
+ "schema": {
49416
+ "type": "string"
49417
+ },
49418
+ "in": "query",
49419
+ "name": "connection",
49420
+ "required": false,
49421
+ "description": "Exact match on `connection`. Equivalent to `?query=connection:<value>`."
49422
+ },
49423
+ {
49424
+ "schema": {
49425
+ "type": "string"
49426
+ },
49427
+ "in": "query",
49428
+ "name": "status",
49429
+ "required": false,
49430
+ "description": "Exact match on `status`. Equivalent to `?query=status:<value>`."
49431
+ },
49432
+ {
49433
+ "schema": {
49434
+ "type": "string"
49435
+ },
49436
+ "in": "query",
49437
+ "name": "sid",
49438
+ "required": false,
49439
+ "description": "Exact match on `sid`. Equivalent to `?query=sid:<value>`."
49440
+ },
49441
+ {
49442
+ "schema": {
49443
+ "type": "string"
49444
+ },
49445
+ "in": "query",
49446
+ "name": "since",
49447
+ "required": false,
49448
+ "description": "Exact match on `since`. Equivalent to `?query=since:<value>`."
49449
+ },
49450
+ {
49451
+ "schema": {
49452
+ "type": "string"
49453
+ },
49454
+ "in": "query",
49455
+ "name": "until",
49456
+ "required": false,
49457
+ "description": "Exact match on `until`. Equivalent to `?query=until:<value>`."
49458
+ },
49459
+ {
49460
+ "schema": {
49461
+ "type": "string"
49462
+ },
49463
+ "in": "query",
49464
+ "name": "query",
49465
+ "required": false,
49466
+ "description": "Filter using a FaableQL query"
49467
+ },
49468
+ {
49469
+ "schema": {
49470
+ "type": "array",
49471
+ "items": {
49472
+ "type": "string",
49473
+ "enum": [
49474
+ "user",
49475
+ "client",
49476
+ "connection"
49477
+ ],
49478
+ "description": "Allowed expand paths on `session`: `user`, `client`, `connection`."
49479
+ },
49480
+ "maxItems": 3
49481
+ },
49482
+ "in": "query",
49483
+ "name": "expand",
49484
+ "required": false,
49485
+ "description": "Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`)."
49486
+ }
49487
+ ],
49488
+ "security": [
49489
+ {
49490
+ "bearerAuth": []
49491
+ }
49492
+ ],
49493
+ "responses": {
49494
+ "200": {
49495
+ "description": "Default Response",
49496
+ "content": {
49497
+ "application/json": {
49498
+ "schema": {
49499
+ "type": "object",
49500
+ "required": [
49501
+ "next",
49502
+ "results"
49503
+ ],
49504
+ "properties": {
49505
+ "next": {
49506
+ "anyOf": [
49507
+ {
49508
+ "type": "string"
49509
+ },
49510
+ {
49511
+ "type": "null"
49512
+ }
49513
+ ]
49514
+ },
49515
+ "results": {
49516
+ "type": "array",
49517
+ "items": {
49518
+ "$ref": "#/components/schemas/Session"
49519
+ }
49520
+ }
49521
+ },
49522
+ "additionalProperties": false
49523
+ }
49524
+ }
49525
+ }
49526
+ },
49527
+ "400": {
49528
+ "description": "`invalid_query` — The `?query=` FaableQL expression could not be parsed.\n\n`invalid_expand` — An `?expand=` path is not allowed on this resource.\n\n`search_not_supported` — This resource does not support `?search=`.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
49529
+ "content": {
49530
+ "application/json": {
49531
+ "schema": {
49532
+ "allOf": [
49533
+ {
49534
+ "$ref": "#/components/schemas/ErrorResponse"
49535
+ },
49536
+ {
49537
+ "type": "object",
49538
+ "properties": {
49539
+ "error_code": {
49540
+ "type": "string",
49541
+ "enum": [
49542
+ "invalid_query",
49543
+ "invalid_expand",
49544
+ "search_not_supported",
49545
+ "validation_error"
49546
+ ]
49547
+ }
49548
+ }
49549
+ }
49550
+ ]
49551
+ }
49552
+ }
49553
+ }
49554
+ },
49555
+ "401": {
49556
+ "description": "`unauthorized` — The request carries no valid credentials.",
49557
+ "content": {
49558
+ "application/json": {
49559
+ "schema": {
49560
+ "allOf": [
49561
+ {
49562
+ "$ref": "#/components/schemas/ErrorResponse"
49563
+ },
49564
+ {
49565
+ "type": "object",
49566
+ "properties": {
49567
+ "error_code": {
49568
+ "type": "string",
49569
+ "enum": [
49570
+ "unauthorized"
49571
+ ]
49572
+ }
49573
+ }
49574
+ }
49575
+ ]
49576
+ }
49577
+ }
49578
+ }
49579
+ },
49580
+ "403": {
49581
+ "description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
49582
+ "content": {
49583
+ "application/json": {
49584
+ "schema": {
49585
+ "allOf": [
49586
+ {
49587
+ "$ref": "#/components/schemas/ErrorResponse"
49588
+ },
49589
+ {
49590
+ "type": "object",
49591
+ "properties": {
49592
+ "error_code": {
49593
+ "type": "string",
49594
+ "enum": [
49595
+ "forbidden",
49596
+ "insufficient_scope",
49597
+ "user_suspended"
49598
+ ]
49599
+ }
49600
+ }
49601
+ }
49602
+ ]
49603
+ }
49604
+ }
49605
+ }
49606
+ },
49607
+ "404": {
49608
+ "description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
49609
+ "content": {
49610
+ "application/json": {
49611
+ "schema": {
49612
+ "allOf": [
49613
+ {
49614
+ "$ref": "#/components/schemas/ErrorResponse"
49615
+ },
49616
+ {
49617
+ "type": "object",
49618
+ "properties": {
49619
+ "error_code": {
49620
+ "type": "string",
49621
+ "enum": [
49622
+ "account_not_found"
49623
+ ]
49624
+ }
49625
+ }
49626
+ }
49627
+ ]
49628
+ }
49629
+ }
49630
+ }
49631
+ },
49632
+ "429": {
49633
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
49634
+ "content": {
49635
+ "application/json": {
49636
+ "schema": {
49637
+ "allOf": [
49638
+ {
49639
+ "$ref": "#/components/schemas/ErrorResponse"
49640
+ },
49641
+ {
49642
+ "type": "object",
49643
+ "properties": {
49644
+ "error_code": {
49645
+ "type": "string",
49646
+ "enum": [
49647
+ "too_many_requests"
49648
+ ]
49649
+ }
49650
+ }
49651
+ }
49652
+ ]
49653
+ }
49654
+ }
49655
+ }
49656
+ },
49657
+ "500": {
49658
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
49659
+ "content": {
49660
+ "application/json": {
49661
+ "schema": {
49662
+ "allOf": [
49663
+ {
49664
+ "$ref": "#/components/schemas/ErrorResponse"
49665
+ },
49666
+ {
49667
+ "type": "object",
49668
+ "properties": {
49669
+ "error_code": {
49670
+ "type": "string",
49671
+ "enum": [
49672
+ "internal_error"
49673
+ ]
49674
+ }
49675
+ }
49676
+ }
49677
+ ]
49678
+ }
49679
+ }
49680
+ }
49681
+ }
49682
+ }
49683
+ }
49684
+ },
49685
+ "/session/{session_id}": {
49686
+ "get": {
49687
+ "operationId": "session/get",
49688
+ "summary": "Get Session",
49689
+ "tags": [
49690
+ "session"
49691
+ ],
49692
+ "description": "Get Session",
49693
+ "parameters": [
49694
+ {
49695
+ "schema": {
49696
+ "type": "array",
49697
+ "items": {
49698
+ "type": "string",
49699
+ "enum": [
49700
+ "user",
49701
+ "client",
49702
+ "connection"
49703
+ ],
49704
+ "description": "Allowed expand paths on `session`: `user`, `client`, `connection`."
49705
+ },
49706
+ "maxItems": 3
49707
+ },
49708
+ "in": "query",
49709
+ "name": "expand",
49710
+ "required": false,
49711
+ "description": "Expand id-only fields in the response. Pass one path per entry (e.g. `?expand=user`)."
49712
+ },
49713
+ {
49714
+ "schema": {
49715
+ "type": "string"
49716
+ },
49717
+ "in": "path",
49718
+ "name": "session_id",
49719
+ "required": true
49720
+ }
49721
+ ],
49722
+ "security": [
49723
+ {
49724
+ "bearerAuth": []
49725
+ }
49726
+ ],
49727
+ "responses": {
49728
+ "200": {
49729
+ "description": "Session",
49730
+ "content": {
49731
+ "application/json": {
49732
+ "schema": {
49733
+ "type": "object",
49734
+ "required": [
49735
+ "id",
49736
+ "user",
49737
+ "sid",
49738
+ "status",
49739
+ "last_seen_at",
49740
+ "expires_at",
49741
+ "account",
49742
+ "createdAt"
49743
+ ],
49744
+ "properties": {
49745
+ "id": {
49746
+ "type": "string",
49747
+ "description": "Session ID"
49748
+ },
49749
+ "user": {
49750
+ "anyOf": [
49751
+ {
49752
+ "$ref": "#/components/schemas/User"
49753
+ },
49754
+ {
49755
+ "type": "string"
49756
+ },
49757
+ {}
49758
+ ]
49759
+ },
49760
+ "sid": {
49761
+ "type": "string",
49762
+ "description": "OIDC session id. Every id_token minted for this session carries it as the `sid` claim; a back-channel or front-channel logout names the session with it."
49763
+ },
49764
+ "status": {
49765
+ "anyOf": [
49766
+ {
49767
+ "type": "string",
49768
+ "enum": [
49769
+ "active"
49770
+ ]
49771
+ },
49772
+ {
49773
+ "type": "string",
49774
+ "enum": [
49775
+ "revoked"
49776
+ ]
49777
+ }
49778
+ ],
49779
+ "description": "`active` or `revoked`. An active session whose `expires_at` is in the past has expired: nothing can refresh it any more, but the row stays for the history."
49780
+ },
49781
+ "ip": {
49782
+ "type": "string",
49783
+ "description": "Client IP at the last authentication."
49784
+ },
49785
+ "user_agent": {
49786
+ "type": "string",
49787
+ "description": "Raw `User-Agent` header at the last authentication."
49788
+ },
49789
+ "client": {
49790
+ "anyOf": [
49791
+ {
49792
+ "$ref": "#/components/schemas/Client"
49793
+ },
49794
+ {
49795
+ "type": "string"
49796
+ },
49797
+ {}
49798
+ ]
49799
+ },
49800
+ "connection": {
49801
+ "anyOf": [
49802
+ {
49803
+ "$ref": "#/components/schemas/Connection"
49804
+ },
49805
+ {
49806
+ "type": "string"
49807
+ },
49808
+ {}
49809
+ ]
49810
+ },
49811
+ "issuer": {
49812
+ "type": "string",
49813
+ "description": "Issuer URL the session was minted on."
49814
+ },
49815
+ "last_seen_at": {
49816
+ "type": "string",
49817
+ "format": "date-time",
49818
+ "description": "Last authentication or token refresh through this session. Each refresh slides `expires_at` 30 days from here."
49819
+ },
49820
+ "expires_at": {
49821
+ "type": "string",
49822
+ "format": "date-time",
49823
+ "description": "When the session stops being usable unless something refreshes it first."
49824
+ },
49825
+ "revoked_at": {
49826
+ "type": "string",
49827
+ "format": "date-time"
49828
+ },
49829
+ "revoked_reason": {
49830
+ "anyOf": [
49831
+ {
49832
+ "type": "string",
49833
+ "enum": [
49834
+ "admin"
49835
+ ]
49836
+ },
49837
+ {
49838
+ "type": "string",
49839
+ "enum": [
49840
+ "logout"
49841
+ ]
49842
+ },
49843
+ {
49844
+ "type": "string",
49845
+ "enum": [
49846
+ "user"
49847
+ ]
49848
+ }
49849
+ ],
49850
+ "description": "`admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device."
49851
+ },
49852
+ "account": {
49853
+ "type": "string",
49854
+ "description": "Object is related with this account"
49855
+ },
49856
+ "metadata": {
49857
+ "type": "object",
49858
+ "properties": {},
49859
+ "additionalProperties": true,
49860
+ "description": "SessionMetadata",
49861
+ "default": {}
49862
+ },
49863
+ "createdAt": {
49864
+ "type": "string",
49865
+ "description": "Session creation date"
49866
+ },
49867
+ "updatedAt": {
49868
+ "type": "string",
49869
+ "description": "Session updated date"
49870
+ }
49871
+ },
49872
+ "description": "Session"
49873
+ }
49874
+ }
49875
+ }
49876
+ },
49877
+ "400": {
49878
+ "description": "`invalid_id` — The id in the path is not a valid id for this resource.\n\n`invalid_expand` — An `?expand=` path is not allowed on this resource.\n\n`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
49879
+ "content": {
49880
+ "application/json": {
49881
+ "schema": {
49882
+ "allOf": [
49883
+ {
49884
+ "$ref": "#/components/schemas/ErrorResponse"
49885
+ },
49886
+ {
49887
+ "type": "object",
49888
+ "properties": {
49889
+ "error_code": {
49890
+ "type": "string",
49891
+ "enum": [
49892
+ "invalid_id",
49893
+ "invalid_expand",
49894
+ "validation_error"
49895
+ ]
49896
+ }
49897
+ }
49898
+ }
49899
+ ]
49900
+ }
49901
+ }
49902
+ }
49903
+ },
49904
+ "401": {
49905
+ "description": "`unauthorized` — The request carries no valid credentials.",
49906
+ "content": {
49907
+ "application/json": {
49908
+ "schema": {
49909
+ "allOf": [
49910
+ {
49911
+ "$ref": "#/components/schemas/ErrorResponse"
49912
+ },
49913
+ {
49914
+ "type": "object",
49915
+ "properties": {
49916
+ "error_code": {
49917
+ "type": "string",
49918
+ "enum": [
49919
+ "unauthorized"
49920
+ ]
49921
+ }
49922
+ }
49923
+ }
49924
+ ]
49925
+ }
49926
+ }
49927
+ }
49928
+ },
49929
+ "403": {
49930
+ "description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
49931
+ "content": {
49932
+ "application/json": {
49933
+ "schema": {
49934
+ "allOf": [
49935
+ {
49936
+ "$ref": "#/components/schemas/ErrorResponse"
49937
+ },
49938
+ {
49939
+ "type": "object",
49940
+ "properties": {
49941
+ "error_code": {
49942
+ "type": "string",
49943
+ "enum": [
49944
+ "forbidden",
49945
+ "insufficient_scope",
49946
+ "user_suspended"
49947
+ ]
49948
+ }
49949
+ }
49950
+ }
49951
+ ]
49952
+ }
49953
+ }
49954
+ }
49955
+ },
49956
+ "404": {
49957
+ "description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
49958
+ "content": {
49959
+ "application/json": {
49960
+ "schema": {
49961
+ "allOf": [
49962
+ {
49963
+ "$ref": "#/components/schemas/ErrorResponse"
49964
+ },
49965
+ {
49966
+ "type": "object",
49967
+ "properties": {
49968
+ "error_code": {
49969
+ "type": "string",
49970
+ "enum": [
49971
+ "not_found",
49972
+ "account_not_found"
49973
+ ]
49974
+ }
49975
+ }
49976
+ }
49977
+ ]
49978
+ }
49979
+ }
49980
+ }
49981
+ },
49982
+ "429": {
49983
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
49984
+ "content": {
49985
+ "application/json": {
49986
+ "schema": {
49987
+ "allOf": [
49988
+ {
49989
+ "$ref": "#/components/schemas/ErrorResponse"
49990
+ },
49991
+ {
49992
+ "type": "object",
49993
+ "properties": {
49994
+ "error_code": {
49995
+ "type": "string",
49996
+ "enum": [
49997
+ "too_many_requests"
49998
+ ]
49999
+ }
50000
+ }
50001
+ }
50002
+ ]
50003
+ }
50004
+ }
50005
+ }
50006
+ },
50007
+ "500": {
50008
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
50009
+ "content": {
50010
+ "application/json": {
50011
+ "schema": {
50012
+ "allOf": [
50013
+ {
50014
+ "$ref": "#/components/schemas/ErrorResponse"
50015
+ },
50016
+ {
50017
+ "type": "object",
50018
+ "properties": {
50019
+ "error_code": {
50020
+ "type": "string",
50021
+ "enum": [
50022
+ "internal_error"
50023
+ ]
50024
+ }
50025
+ }
50026
+ }
50027
+ ]
50028
+ }
50029
+ }
50030
+ }
50031
+ }
50032
+ }
50033
+ }
50034
+ },
50035
+ "/session/{session_id}/revoke": {
50036
+ "post": {
50037
+ "operationId": "session/revoke",
50038
+ "summary": "Revoke a session",
50039
+ "tags": [
50040
+ "session"
50041
+ ],
50042
+ "description": "Ends the session for good: the browser cookie behind it stops working, every refresh token issued through it is refused on its next use (`invalid_grant`), and the relying parties that took part in it are notified. Access and id tokens already issued keep working until they expire. The row stays, marked `revoked`, for the device history.",
50043
+ "parameters": [
50044
+ {
50045
+ "schema": {
50046
+ "type": "string"
50047
+ },
50048
+ "in": "path",
50049
+ "name": "session_id",
50050
+ "required": true
50051
+ }
50052
+ ],
50053
+ "security": [
50054
+ {
50055
+ "bearerAuth": []
50056
+ }
50057
+ ],
50058
+ "responses": {
50059
+ "200": {
50060
+ "description": "Session",
50061
+ "content": {
50062
+ "application/json": {
50063
+ "schema": {
50064
+ "type": "object",
50065
+ "required": [
50066
+ "id",
50067
+ "user",
50068
+ "sid",
50069
+ "status",
50070
+ "last_seen_at",
50071
+ "expires_at",
50072
+ "account",
50073
+ "createdAt"
50074
+ ],
50075
+ "properties": {
50076
+ "id": {
50077
+ "type": "string",
50078
+ "description": "Session ID"
50079
+ },
50080
+ "user": {
50081
+ "anyOf": [
50082
+ {
50083
+ "$ref": "#/components/schemas/User"
50084
+ },
50085
+ {
50086
+ "type": "string"
50087
+ },
50088
+ {}
50089
+ ]
50090
+ },
50091
+ "sid": {
50092
+ "type": "string",
50093
+ "description": "OIDC session id. Every id_token minted for this session carries it as the `sid` claim; a back-channel or front-channel logout names the session with it."
50094
+ },
50095
+ "status": {
50096
+ "anyOf": [
50097
+ {
50098
+ "type": "string",
50099
+ "enum": [
50100
+ "active"
50101
+ ]
50102
+ },
50103
+ {
50104
+ "type": "string",
50105
+ "enum": [
50106
+ "revoked"
50107
+ ]
50108
+ }
50109
+ ],
50110
+ "description": "`active` or `revoked`. An active session whose `expires_at` is in the past has expired: nothing can refresh it any more, but the row stays for the history."
50111
+ },
50112
+ "ip": {
50113
+ "type": "string",
50114
+ "description": "Client IP at the last authentication."
50115
+ },
50116
+ "user_agent": {
50117
+ "type": "string",
50118
+ "description": "Raw `User-Agent` header at the last authentication."
50119
+ },
50120
+ "client": {
50121
+ "anyOf": [
50122
+ {
50123
+ "$ref": "#/components/schemas/Client"
50124
+ },
50125
+ {
50126
+ "type": "string"
50127
+ },
50128
+ {}
50129
+ ]
50130
+ },
50131
+ "connection": {
50132
+ "anyOf": [
50133
+ {
50134
+ "$ref": "#/components/schemas/Connection"
50135
+ },
50136
+ {
50137
+ "type": "string"
50138
+ },
50139
+ {}
50140
+ ]
50141
+ },
50142
+ "issuer": {
50143
+ "type": "string",
50144
+ "description": "Issuer URL the session was minted on."
50145
+ },
50146
+ "last_seen_at": {
50147
+ "type": "string",
50148
+ "format": "date-time",
50149
+ "description": "Last authentication or token refresh through this session. Each refresh slides `expires_at` 30 days from here."
50150
+ },
50151
+ "expires_at": {
50152
+ "type": "string",
50153
+ "format": "date-time",
50154
+ "description": "When the session stops being usable unless something refreshes it first."
50155
+ },
50156
+ "revoked_at": {
50157
+ "type": "string",
50158
+ "format": "date-time"
50159
+ },
50160
+ "revoked_reason": {
50161
+ "anyOf": [
50162
+ {
50163
+ "type": "string",
50164
+ "enum": [
50165
+ "admin"
50166
+ ]
50167
+ },
50168
+ {
50169
+ "type": "string",
50170
+ "enum": [
50171
+ "logout"
50172
+ ]
50173
+ },
50174
+ {
50175
+ "type": "string",
50176
+ "enum": [
50177
+ "user"
50178
+ ]
50179
+ }
50180
+ ],
50181
+ "description": "`admin`: revoked through the Management API. `logout`: the user signed out. `user`: the user revoked it from another device."
50182
+ },
50183
+ "account": {
50184
+ "type": "string",
50185
+ "description": "Object is related with this account"
50186
+ },
50187
+ "metadata": {
50188
+ "type": "object",
50189
+ "properties": {},
50190
+ "additionalProperties": true,
50191
+ "description": "SessionMetadata",
50192
+ "default": {}
50193
+ },
50194
+ "createdAt": {
50195
+ "type": "string",
50196
+ "description": "Session creation date"
50197
+ },
50198
+ "updatedAt": {
50199
+ "type": "string",
50200
+ "description": "Session updated date"
50201
+ }
50202
+ },
50203
+ "description": "Session"
50204
+ }
50205
+ }
50206
+ }
50207
+ },
50208
+ "400": {
50209
+ "description": "`validation_error` — The body, query or path failed schema validation. `details.issues` lists each failing field.",
50210
+ "content": {
50211
+ "application/json": {
50212
+ "schema": {
50213
+ "allOf": [
50214
+ {
50215
+ "$ref": "#/components/schemas/ErrorResponse"
50216
+ },
50217
+ {
50218
+ "type": "object",
50219
+ "properties": {
50220
+ "error_code": {
50221
+ "type": "string",
50222
+ "enum": [
50223
+ "validation_error"
50224
+ ]
50225
+ }
50226
+ }
50227
+ }
50228
+ ]
50229
+ }
50230
+ }
50231
+ }
50232
+ },
50233
+ "401": {
50234
+ "description": "`unauthorized` — The request carries no valid credentials.",
50235
+ "content": {
50236
+ "application/json": {
50237
+ "schema": {
50238
+ "allOf": [
50239
+ {
50240
+ "$ref": "#/components/schemas/ErrorResponse"
50241
+ },
50242
+ {
50243
+ "type": "object",
50244
+ "properties": {
50245
+ "error_code": {
50246
+ "type": "string",
50247
+ "enum": [
50248
+ "unauthorized"
50249
+ ]
50250
+ }
50251
+ }
50252
+ }
50253
+ ]
50254
+ }
50255
+ }
50256
+ }
50257
+ },
50258
+ "403": {
50259
+ "description": "`forbidden` — The credentials are valid but do not allow this operation.\n\n`insufficient_scope` — The token lacks a scope this operation requires. `message` names it.\n\n`user_suspended` — The user is suspended and cannot sign in or be modified.",
50260
+ "content": {
50261
+ "application/json": {
50262
+ "schema": {
50263
+ "allOf": [
50264
+ {
50265
+ "$ref": "#/components/schemas/ErrorResponse"
50266
+ },
50267
+ {
50268
+ "type": "object",
50269
+ "properties": {
50270
+ "error_code": {
50271
+ "type": "string",
50272
+ "enum": [
50273
+ "forbidden",
50274
+ "insufficient_scope",
50275
+ "user_suspended"
50276
+ ]
50277
+ }
50278
+ }
50279
+ }
50280
+ ]
50281
+ }
50282
+ }
50283
+ }
50284
+ },
50285
+ "404": {
50286
+ "description": "`not_found` — The resource does not exist in this account.\n\n`account_not_found` — No Auth Account matches the request (domain, header or token).",
50287
+ "content": {
50288
+ "application/json": {
50289
+ "schema": {
50290
+ "allOf": [
50291
+ {
50292
+ "$ref": "#/components/schemas/ErrorResponse"
50293
+ },
50294
+ {
50295
+ "type": "object",
50296
+ "properties": {
50297
+ "error_code": {
50298
+ "type": "string",
50299
+ "enum": [
50300
+ "not_found",
50301
+ "account_not_found"
50302
+ ]
50303
+ }
50304
+ }
50305
+ }
50306
+ ]
50307
+ }
50308
+ }
50309
+ }
50310
+ },
50311
+ "409": {
50312
+ "description": "`session_already_revoked` — The session was already revoked.",
50313
+ "content": {
50314
+ "application/json": {
50315
+ "schema": {
50316
+ "allOf": [
50317
+ {
50318
+ "$ref": "#/components/schemas/ErrorResponse"
50319
+ },
50320
+ {
50321
+ "type": "object",
50322
+ "properties": {
50323
+ "error_code": {
50324
+ "type": "string",
50325
+ "enum": [
50326
+ "session_already_revoked"
50327
+ ]
50328
+ }
50329
+ }
50330
+ }
50331
+ ]
50332
+ }
50333
+ }
50334
+ }
50335
+ },
50336
+ "429": {
50337
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
50338
+ "content": {
50339
+ "application/json": {
50340
+ "schema": {
50341
+ "allOf": [
50342
+ {
50343
+ "$ref": "#/components/schemas/ErrorResponse"
50344
+ },
50345
+ {
50346
+ "type": "object",
50347
+ "properties": {
50348
+ "error_code": {
50349
+ "type": "string",
50350
+ "enum": [
50351
+ "too_many_requests"
50352
+ ]
50353
+ }
50354
+ }
50355
+ }
50356
+ ]
50357
+ }
50358
+ }
50359
+ }
50360
+ },
50361
+ "500": {
50362
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
50363
+ "content": {
50364
+ "application/json": {
50365
+ "schema": {
50366
+ "allOf": [
50367
+ {
50368
+ "$ref": "#/components/schemas/ErrorResponse"
50369
+ },
50370
+ {
50371
+ "type": "object",
50372
+ "properties": {
50373
+ "error_code": {
50374
+ "type": "string",
50375
+ "enum": [
50376
+ "internal_error"
50377
+ ]
50378
+ }
50379
+ }
50380
+ }
50381
+ ]
50382
+ }
50383
+ }
50384
+ }
50385
+ }
50386
+ }
50387
+ }
50388
+ },
49201
50389
  "/customdomain/{customdomain_id}/retry": {
49202
50390
  "post": {
49203
50391
  "operationId": "customdomain/retry",
@@ -55711,6 +56899,284 @@
55711
56899
  }
55712
56900
  }
55713
56901
  },
56902
+ "/me/sessions": {
56903
+ "get": {
56904
+ "operationId": "session/meSessions",
56905
+ "summary": "List the current user's active sessions",
56906
+ "tags": [
56907
+ "session"
56908
+ ],
56909
+ "description": "Every active session of the user behind the request (cookie or bearer), newest first; `current_session_id` names the one this request came through.",
56910
+ "responses": {
56911
+ "200": {
56912
+ "description": "Default Response",
56913
+ "content": {
56914
+ "application/json": {
56915
+ "schema": {
56916
+ "type": "object",
56917
+ "required": [
56918
+ "results",
56919
+ "current_session_id"
56920
+ ],
56921
+ "properties": {
56922
+ "results": {
56923
+ "type": "array",
56924
+ "items": {
56925
+ "$ref": "#/components/schemas/Session"
56926
+ }
56927
+ },
56928
+ "current_session_id": {
56929
+ "anyOf": [
56930
+ {
56931
+ "type": "string"
56932
+ },
56933
+ {
56934
+ "type": "null"
56935
+ }
56936
+ ],
56937
+ "description": "The id of the session this request came through: the cookie, or the session the bearer token was issued in. Null when the token predates session ids."
56938
+ }
56939
+ }
56940
+ }
56941
+ }
56942
+ }
56943
+ },
56944
+ "401": {
56945
+ "description": "`mfa_pending` — A second-factor challenge is pending; answer it before continuing.\n\n`not_logged_in` — There is no signed-in session for this request.",
56946
+ "content": {
56947
+ "application/json": {
56948
+ "schema": {
56949
+ "allOf": [
56950
+ {
56951
+ "$ref": "#/components/schemas/ErrorResponse"
56952
+ },
56953
+ {
56954
+ "type": "object",
56955
+ "properties": {
56956
+ "error_code": {
56957
+ "type": "string",
56958
+ "enum": [
56959
+ "mfa_pending",
56960
+ "not_logged_in"
56961
+ ]
56962
+ }
56963
+ }
56964
+ }
56965
+ ]
56966
+ }
56967
+ }
56968
+ }
56969
+ },
56970
+ "404": {
56971
+ "description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
56972
+ "content": {
56973
+ "application/json": {
56974
+ "schema": {
56975
+ "allOf": [
56976
+ {
56977
+ "$ref": "#/components/schemas/ErrorResponse"
56978
+ },
56979
+ {
56980
+ "type": "object",
56981
+ "properties": {
56982
+ "error_code": {
56983
+ "type": "string",
56984
+ "enum": [
56985
+ "account_not_found"
56986
+ ]
56987
+ }
56988
+ }
56989
+ }
56990
+ ]
56991
+ }
56992
+ }
56993
+ }
56994
+ },
56995
+ "429": {
56996
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
56997
+ "content": {
56998
+ "application/json": {
56999
+ "schema": {
57000
+ "allOf": [
57001
+ {
57002
+ "$ref": "#/components/schemas/ErrorResponse"
57003
+ },
57004
+ {
57005
+ "type": "object",
57006
+ "properties": {
57007
+ "error_code": {
57008
+ "type": "string",
57009
+ "enum": [
57010
+ "too_many_requests"
57011
+ ]
57012
+ }
57013
+ }
57014
+ }
57015
+ ]
57016
+ }
57017
+ }
57018
+ }
57019
+ },
57020
+ "500": {
57021
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
57022
+ "content": {
57023
+ "application/json": {
57024
+ "schema": {
57025
+ "allOf": [
57026
+ {
57027
+ "$ref": "#/components/schemas/ErrorResponse"
57028
+ },
57029
+ {
57030
+ "type": "object",
57031
+ "properties": {
57032
+ "error_code": {
57033
+ "type": "string",
57034
+ "enum": [
57035
+ "internal_error"
57036
+ ]
57037
+ }
57038
+ }
57039
+ }
57040
+ ]
57041
+ }
57042
+ }
57043
+ }
57044
+ }
57045
+ }
57046
+ }
57047
+ },
57048
+ "/me/sessions/revoke-others": {
57049
+ "post": {
57050
+ "operationId": "session/meRevokeOtherSessions",
57051
+ "summary": "Sign the current user out everywhere else",
57052
+ "tags": [
57053
+ "session"
57054
+ ],
57055
+ "description": "Revokes every active session of the user except the one this request came through. Refresh tokens issued in the revoked sessions are refused on their next use; access and id tokens already issued keep working until they expire.",
57056
+ "responses": {
57057
+ "200": {
57058
+ "description": "Default Response",
57059
+ "content": {
57060
+ "application/json": {
57061
+ "schema": {
57062
+ "type": "object",
57063
+ "required": [
57064
+ "revoked"
57065
+ ],
57066
+ "properties": {
57067
+ "revoked": {
57068
+ "type": "number",
57069
+ "description": "How many sessions were ended."
57070
+ }
57071
+ }
57072
+ }
57073
+ }
57074
+ }
57075
+ },
57076
+ "401": {
57077
+ "description": "`mfa_pending` — A second-factor challenge is pending; answer it before continuing.\n\n`not_logged_in` — There is no signed-in session for this request.",
57078
+ "content": {
57079
+ "application/json": {
57080
+ "schema": {
57081
+ "allOf": [
57082
+ {
57083
+ "$ref": "#/components/schemas/ErrorResponse"
57084
+ },
57085
+ {
57086
+ "type": "object",
57087
+ "properties": {
57088
+ "error_code": {
57089
+ "type": "string",
57090
+ "enum": [
57091
+ "mfa_pending",
57092
+ "not_logged_in"
57093
+ ]
57094
+ }
57095
+ }
57096
+ }
57097
+ ]
57098
+ }
57099
+ }
57100
+ }
57101
+ },
57102
+ "404": {
57103
+ "description": "`account_not_found` — No Auth Account matches the request (domain, header or token).",
57104
+ "content": {
57105
+ "application/json": {
57106
+ "schema": {
57107
+ "allOf": [
57108
+ {
57109
+ "$ref": "#/components/schemas/ErrorResponse"
57110
+ },
57111
+ {
57112
+ "type": "object",
57113
+ "properties": {
57114
+ "error_code": {
57115
+ "type": "string",
57116
+ "enum": [
57117
+ "account_not_found"
57118
+ ]
57119
+ }
57120
+ }
57121
+ }
57122
+ ]
57123
+ }
57124
+ }
57125
+ }
57126
+ },
57127
+ "429": {
57128
+ "description": "`too_many_requests` — Rate limit exceeded. Honour the `Retry-After` header.",
57129
+ "content": {
57130
+ "application/json": {
57131
+ "schema": {
57132
+ "allOf": [
57133
+ {
57134
+ "$ref": "#/components/schemas/ErrorResponse"
57135
+ },
57136
+ {
57137
+ "type": "object",
57138
+ "properties": {
57139
+ "error_code": {
57140
+ "type": "string",
57141
+ "enum": [
57142
+ "too_many_requests"
57143
+ ]
57144
+ }
57145
+ }
57146
+ }
57147
+ ]
57148
+ }
57149
+ }
57150
+ }
57151
+ },
57152
+ "500": {
57153
+ "description": "`internal_error` — Unexpected server error. Retry later; the request id is logged.",
57154
+ "content": {
57155
+ "application/json": {
57156
+ "schema": {
57157
+ "allOf": [
57158
+ {
57159
+ "$ref": "#/components/schemas/ErrorResponse"
57160
+ },
57161
+ {
57162
+ "type": "object",
57163
+ "properties": {
57164
+ "error_code": {
57165
+ "type": "string",
57166
+ "enum": [
57167
+ "internal_error"
57168
+ ]
57169
+ }
57170
+ }
57171
+ }
57172
+ ]
57173
+ }
57174
+ }
57175
+ }
57176
+ }
57177
+ }
57178
+ }
57179
+ },
55714
57180
  "/logout": {
55715
57181
  "get": {
55716
57182
  "operationId": "session/logout",