openapi: 3.0.3
info:
contact:
email: hi@ory.sh
description: 'Documentation for all of Ory Hydra''s APIs.
'
license:
name: Apache 2.0
title: Ory Hydra api frontend API
version: ''
tags:
- description: Endpoints used by frontend applications (e.g. Single-Page-App, Native Apps, Server Apps, ...) to manage a user's own profile.
name: frontend
paths:
/.well-known/ory/webauthn.js:
get:
description: 'This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration.
If you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:
```html
```
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: getWebAuthnJavaScript
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/webAuthnJavaScript'
description: webAuthnJavaScript
summary: Get WebAuthn JavaScript
tags:
- frontend
x-ory-ratelimit-bucket: hydra-public-high
/self-service/errors:
get:
description: 'This endpoint returns the error associated with a user-facing self service errors.
This endpoint supports stub values to help you implement the error UI:
`?id=stub:500` - returns a stub 500 (Internal Server Error) error.
More information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-facing-errors).'
operationId: getFlowError
parameters:
- description: Error is the error's ID
in: query
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/flowError'
description: flowError
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get User-Flow Errors
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/fed-cm/parameters:
get:
description: This endpoint returns a list of all available FedCM providers. It is only supported on the Ory Network.
operationId: createFedcmFlow
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/createFedcmFlowResponse'
description: createFedcmFlowResponse
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get FedCM Parameters
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/fed-cm/token:
post:
description: 'Use this endpoint to submit a token from a FedCM provider through
`navigator.credentials.get` and log the user in. The parameters from
`navigator.credentials.get` must have come from `GET
self-service/fed-cm/parameters`.'
operationId: updateFedcmFlow
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateFedcmFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UpdateFedcmFlowBody'
required: true
x-originalParamName: Body
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/successfulNativeLogin'
description: successfulNativeLogin
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Submit a FedCM token
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
/self-service/login:
post:
description: 'Use this endpoint to complete a login flow. This endpoint
behaves differently for API and browser flows.
API flows expect `application/json` to be sent in the body and responds with
HTTP 200 and a application/json body with the session token on success;
HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body;
HTTP 400 on form validation errors.
Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with
a HTTP 303 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded;
a HTTP 303 redirect to the login UI URL with the flow ID containing the validation errors otherwise.
Browser flows with an accept header of `application/json` will not redirect but instead respond with
HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
HTTP 400 on form validation errors.
If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`session_already_available`: The user is already signed in.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
Most likely used in Social Sign In flows.
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: updateLoginFlow
parameters:
- description: 'The Login Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/login?flow=abcde`).'
in: query
name: flow
required: true
schema:
type: string
- description: The Session Token of the Identity performing the settings flow.
in: header
name: X-Session-Token
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateLoginFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateLoginFlowBody'
required: true
x-originalParamName: Body
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/successfulNativeLogin'
description: successfulNativeLogin
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Submit a Login Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
/self-service/login/api:
get:
description: 'This endpoint initiates a login flow for native apps that do not use a browser, such as mobile devices, smart TVs, and so on.
If a valid provided session cookie or session token is provided, a 400 Bad Request error
will be returned unless the URL query parameter `?refresh=true` is set.
To fetch an existing login flow call `/self-service/login/flows?flow=`.
You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
you vulnerable to a variety of CSRF attacks, including CSRF login attacks.
In the case of an error, the `error.id` of the JSON response body can be one of:
`session_already_available`: The user is already signed in.
`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: createNativeLoginFlow
parameters:
- description: 'Refresh a login session
If set to true, this will refresh an existing login session by
asking the user to sign in again. This will reset the
authenticated_at time of the session.'
in: query
name: refresh
schema:
type: boolean
- description: 'Request a Specific AuthenticationMethod Assurance Level
Use this parameter to upgrade an existing session''s authenticator assurance level (AAL). This
allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password,
the AAL is 1. If you wish to "upgrade" the session''s security by asking the user to perform TOTP / WebAuth/ ...
you would set this to "aal2".'
in: query
name: aal
schema:
type: string
- description: The Session Token of the Identity performing the settings flow.
in: header
name: X-Session-Token
schema:
type: string
- description: 'EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token
after the login flow has been completed.'
in: query
name: return_session_token_exchange_code
schema:
type: boolean
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
- description: 'An optional organization ID that should be used for logging this user in.
This parameter is only effective in the Ory Network.'
in: query
name: organization
schema:
type: string
- description: 'Via should contain the identity''s credential the code should be sent to. Only relevant in aal2 flows.
DEPRECATED: This field is deprecated. Please remove it from your requests. The user will now see a choice
of MFA credentials to choose from to perform the second factor instead.'
in: query
name: via
schema:
type: string
- description: An optional identity schema to use for the login flow.
in: query
name: identity_schema
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Login Flow for Native Apps
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/login/browser:
get:
description: 'This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate
cookies and anti-CSRF measures required for browser-based flows.
If this endpoint is opened as a link in the browser, it will be redirected to
`selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
exists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter
`?refresh=true` was set.
If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`session_already_available`: The user is already signed in.
`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
The optional query parameter login_challenge is set when using Kratos with
Hydra in an OAuth2 flow. See the oauth2_provider.url configuration
option.
This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: createBrowserLoginFlow
parameters:
- description: 'Refresh a login session
If set to true, this will refresh an existing login session by
asking the user to sign in again. This will reset the
authenticated_at time of the session.'
in: query
name: refresh
schema:
type: boolean
- description: 'Request a Specific AuthenticationMethod Assurance Level
Use this parameter to upgrade an existing session''s authenticator assurance level (AAL). This
allows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password,
the AAL is 1. If you wish to "upgrade" the session''s security by asking the user to perform TOTP / WebAuth/ ...
you would set this to "aal2".'
in: query
name: aal
schema:
type: string
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
- description: 'An optional Hydra login challenge. If present, Kratos will cooperate with
Ory Hydra to act as an OAuth2 identity provider.
The value for this parameter comes from `login_challenge` URL Query parameter sent to your
application (e.g. `/login?login_challenge=abcde`).'
in: query
name: login_challenge
schema:
type: string
- description: 'An optional organization ID that should be used for logging this user in.
This parameter is only effective in the Ory Network.'
in: query
name: organization
schema:
type: string
- description: 'Via should contain the identity''s credential the code should be sent to. Only relevant in aal2 flows.
DEPRECATED: This field is deprecated. Please remove it from your requests. The user will now see a choice
of MFA credentials to choose from to perform the second factor instead.'
in: query
name: via
schema:
type: string
- description: An optional identity schema to use for the login flow.
in: query
name: identity_schema
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Login Flow for Browsers
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/login/flows:
get:
description: 'This endpoint returns a login flow''s context with, for example, error details and other information.
Browser flows expect the anti-CSRF cookie to be included in the request''s HTTP Cookie Header.
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
and you need to forward the incoming HTTP Cookie header to this endpoint:
```js
pseudo-code example
router.get(''/login'', async function (req, res) {
const flow = await client.getLoginFlow(req.header(''cookie''), req.query[''flow''])
res.render(''login'', flow)
})
```
This request may fail due to several reasons. The `error.id` can be one of:
`session_already_available`: The user is already signed in.
`self_service_flow_expired`: The flow is expired and you should request a new one.
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: getLoginFlow
parameters:
- description: 'The Login Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/login?flow=abcde`).'
in: query
name: id
required: true
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/loginFlow'
description: loginFlow
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Login Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/logout:
get:
description: 'This endpoint logs out an identity in a self-service manner.
If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other)
to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.
If the `Accept` HTTP header is set to `application/json`, a 204 No Content response
will be sent on successful logout instead.
This endpoint is NOT INTENDED for API clients and only works
with browsers (Chrome, Firefox, ...). For API clients you can
call the `/self-service/logout/api` URL directly with the Ory Session Token.
More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.com/docs/next/kratos/self-service/flows/user-logout).'
operationId: updateLogoutFlow
parameters:
- description: 'A Valid Logout Token
If you do not have a logout token because you only have a session cookie,
call `/self-service/logout/browser` to generate a URL for this endpoint.'
in: query
name: token
schema:
type: string
- description: The URL to return to after the logout was completed.
in: query
name: return_to
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
responses:
'204':
$ref: '#/components/responses/emptyResponse'
'303':
$ref: '#/components/responses/emptyResponse'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Update Logout Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/logout/api:
delete:
description: 'Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully
revoked, the server returns a 204 No Content response. A 204 No Content response is also sent when
the Ory Session Token has been revoked already before.
If the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.
This endpoint does not remove any HTTP
Cookies - use the Browser-Based Self-Service Logout Flow instead.'
operationId: performNativeLogout
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/performNativeLogoutBody'
required: true
x-originalParamName: Body
responses:
'204':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Perform Logout for Native Apps
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/logout/browser:
get:
description: 'This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.
This endpoint is NOT INTENDED for API clients and only works
with browsers (Chrome, Firefox, ...). For API clients you can
call the `/self-service/logout/api` URL directly with the Ory Session Token.
The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns
a 401 error.
When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.'
operationId: createBrowserLogoutFlow
parameters:
- description: 'HTTP Cookies
If you call this endpoint from a backend, please include the
original Cookie header in the request.'
in: header
name: cookie
schema:
type: string
- description: 'Return to URL
The URL to which the browser should be redirected to after the logout
has been performed.'
in: query
name: return_to
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/logoutFlow'
description: logoutFlow
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create a Logout URL for Browsers
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/recovery:
post:
description: 'Use this endpoint to update a recovery flow. This endpoint
behaves differently for API and browser flows and has several states:
`choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
and works with API- and Browser-initiated flows.
For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid.
and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired).
For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended.
`sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It
works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
`passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a recovery link")
does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
(if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with
a new Recovery Flow ID which contains an error message that the recovery link was invalid.
More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).'
operationId: updateRecoveryFlow
parameters:
- description: 'The Recovery Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/recovery?flow=abcde`).'
in: query
name: flow
required: true
schema:
type: string
- description: 'Recovery Token
The recovery token which completes the recovery request. If the token
is invalid (e.g. expired) an error will be shown to the end-user.
This parameter is usually set in a link and not used by any direct API call.'
in: query
name: token
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateRecoveryFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateRecoveryFlowBody'
required: true
x-originalParamName: Body
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Update Recovery Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
/self-service/recovery/api:
get:
description: 'This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.
If a valid provided session cookie or session token is provided, a 400 Bad Request error.
On an existing recovery flow, use the `getRecoveryFlow` API endpoint.
You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
you vulnerable to a variety of CSRF attacks.
This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).'
operationId: createNativeRecoveryFlow
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Recovery Flow for Native Apps
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/recovery/browser:
get:
description: 'This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to
`selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
exists, the browser is returned to the configured return URL.
If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects
or a 400 bad request error if the user is already authenticated.
This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).'
operationId: createBrowserRecoveryFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
- description: 'Skip redirection to the settings UI after the recovery flow was
completed. Instead, the user will be redirected to the URL specified in
`return_to` query parameter or the default return URL if `return_to` is
not set.'
in: query
name: skip_settings
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Recovery Flow for Browsers
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/recovery/flows:
get:
description: 'This endpoint returns a recovery flow''s context with, for example, error details and other information.
Browser flows expect the anti-CSRF cookie to be included in the request''s HTTP Cookie Header.
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
and you need to forward the incoming HTTP Cookie header to this endpoint:
```js
pseudo-code example
router.get(''/recovery'', async function (req, res) {
const flow = await client.getRecoveryFlow(req.header(''Cookie''), req.query[''flow''])
res.render(''recovery'', flow)
})
```
More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).'
operationId: getRecoveryFlow
parameters:
- description: 'The Flow ID
The value for this parameter comes from `request` URL Query parameter sent to your
application (e.g. `/recovery?flow=abcde`).'
in: query
name: id
required: true
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/recoveryFlow'
description: recoveryFlow
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Recovery Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/registration:
post:
description: 'Use this endpoint to complete a registration flow by sending an identity''s traits and password. This endpoint
behaves differently for API and browser flows.
API flows expect `application/json` to be sent in the body and respond with
HTTP 200 and a application/json body with the created identity success - if the session hook is configured the
`session` and `session_token` will also be included;
HTTP 410 if the original flow expired with the appropriate error messages set and optionally a `use_flow_id` parameter in the body;
HTTP 400 on form validation errors.
Browser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with
a HTTP 303 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded;
a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.
Browser flows with an accept header of `application/json` will not redirect but instead respond with
HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
HTTP 400 on form validation errors.
If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`session_already_available`: The user is already signed in.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
Most likely used in Social Sign In flows.
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: updateRegistrationFlow
parameters:
- description: 'The Registration Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/registration?flow=abcde`).'
in: query
name: flow
required: true
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateRegistrationFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateRegistrationFlowBody'
required: true
x-originalParamName: Body
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/successfulNativeRegistration'
description: successfulNativeRegistration
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Update Registration Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
/self-service/registration/api:
get:
description: 'This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.
If a valid provided session cookie or session token is provided, a 400 Bad Request error
will be returned unless the URL query parameter `?refresh=true` is set.
To fetch an existing registration flow call `/self-service/registration/flows?flow=`.
You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
you vulnerable to a variety of CSRF attacks.
In the case of an error, the `error.id` of the JSON response body can be one of:
`session_already_available`: The user is already signed in.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: createNativeRegistrationFlow
parameters:
- description: 'EnableSessionTokenExchangeCode requests the login flow to include a code that can be used to retrieve the session token
after the login flow has been completed.'
in: query
name: return_session_token_exchange_code
schema:
type: boolean
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
- description: 'An optional organization ID that should be used to register this user.
This parameter is only effective in the Ory Network.'
in: query
name: organization
schema:
type: string
- description: An optional identity schema to use for the registration flow.
in: query
name: identity_schema
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Registration Flow for Native Apps
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/registration/browser:
get:
description: 'This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate
cookies and anti-CSRF measures required for browser-based flows.
If this endpoint is opened as a link in the browser, it will be redirected to
`selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session
exists already, the browser will be redirected to `urls.default_redirect_url`.
If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`session_already_available`: The user is already signed in.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
If this endpoint is called via an AJAX request, the response contains the registration flow without a redirect.
This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: createBrowserRegistrationFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
- description: 'Ory OAuth 2.0 Login Challenge.
If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.
The value for this parameter comes from `login_challenge` URL Query parameter sent to your
application (e.g. `/registration?login_challenge=abcde`).
This feature is compatible with Ory Hydra when not running on the Ory Network.'
in: query
name: login_challenge
schema:
type: string
- description: 'The URL to return the browser to after the verification flow was completed.
After the registration flow is completed, the user will be sent a verification email.
Upon completing the verification flow, this URL will be used to override the default
`selfservice.flows.verification.after.default_redirect_to` value.'
in: query
name: after_verification_return_to
schema:
type: string
- description: 'An optional organization ID that should be used to register this user.
This parameter is only effective in the Ory Network.'
in: query
name: organization
schema:
type: string
- description: An optional identity schema to use for the registration flow.
in: query
name: identity_schema
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
'303':
$ref: '#/components/responses/emptyResponse'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Registration Flow for Browsers
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/registration/flows:
get:
description: 'This endpoint returns a registration flow''s context with, for example, error details and other information.
Browser flows expect the anti-CSRF cookie to be included in the request''s HTTP Cookie Header.
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
and you need to forward the incoming HTTP Cookie header to this endpoint:
```js
pseudo-code example
router.get(''/registration'', async function (req, res) {
const flow = await client.getRegistrationFlow(req.header(''cookie''), req.query[''flow''])
res.render(''registration'', flow)
})
```
This request may fail due to several reasons. The `error.id` can be one of:
`session_already_available`: The user is already signed in.
`self_service_flow_expired`: The flow is expired and you should request a new one.
More information can be found at [Ory Kratos User Login](https://www.ory.com/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.com/docs/kratos/self-service/flows/user-registration).'
operationId: getRegistrationFlow
parameters:
- description: 'The Registration Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/registration?flow=abcde`).'
in: query
name: id
required: true
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/registrationFlow'
description: registrationFlow
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Registration Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/settings:
post:
description: 'Use this endpoint to complete a settings flow by sending an identity''s updated password. This endpoint
behaves differently for API and browser flows.
API-initiated flows expect `application/json` to be sent in the body and respond with
HTTP 200 and an application/json body with the session token on success;
HTTP 303 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set;
HTTP 400 on form validation errors.
HTTP 401 when the endpoint is called without a valid session token.
HTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session''s AAL is too low.
Implies that the user needs to re-authenticate.
Browser flows without HTTP Header `Accept` or with `Accept: text/*` respond with
a HTTP 303 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded;
a HTTP 303 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise.
a HTTP 303 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session''s AAL is too low.
Browser flows with HTTP Header `Accept: application/json` respond with
HTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;
HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;
HTTP 401 when the endpoint is called without a valid session cookie.
HTTP 403 when the page is accessed without a session cookie or the session''s AAL is too low.
HTTP 400 on form validation errors.
Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.
If this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect
the identity to the login init endpoint with query parameters `?refresh=true&return_to=`,
or initiate a refresh login flow otherwise.
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`session_inactive`: No Ory Session was found - sign in a user first.
`security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other
identity logged in instead.
`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
Most likely used in Social Sign In flows.
More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).'
operationId: updateSettingsFlow
parameters:
- description: 'The Settings Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/settings?flow=abcde`).'
in: query
name: flow
required: true
schema:
type: string
- description: The Session Token of the Identity performing the settings flow.
in: header
name: X-Session-Token
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateSettingsFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateSettingsFlowBody'
required: true
x-originalParamName: Body
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/errorBrowserLocationChangeRequired'
description: errorBrowserLocationChangeRequired
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
security:
- sessionToken: []
summary: Complete Settings Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
/self-service/settings/api:
get:
description: 'This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on.
You must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.
To fetch an existing settings flow call `/self-service/settings/flows?flow=`.
You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
you vulnerable to a variety of CSRF attacks.
Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
to sign in with the second factor or change the configuration.
In the case of an error, the `error.id` of the JSON response body can be one of:
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`session_inactive`: No Ory Session was found - sign in a user first.
This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).'
operationId: createNativeSettingsFlow
parameters:
- description: The Session Token of the Identity performing the settings flow.
in: header
name: X-Session-Token
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Settings Flow for Native Apps
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/settings/browser:
get:
description: 'This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to
`selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid
Ory Kratos Session Cookie is included in the request, a login flow will be initialized.
If this endpoint is opened as a link in the browser, it will be redirected to
`selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session
was set, the browser will be redirected to the login endpoint.
If this endpoint is called via an AJAX request, the response contains the settings flow without any redirects
or a 401 forbidden error if no valid session was set.
Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
to sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.
If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`session_inactive`: No Ory Session was found - sign in a user first.
`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).'
operationId: createBrowserSettingsFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Settings Flow for Browsers
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/settings/flows:
get:
description: 'When accessing this endpoint through Ory Kratos'' Public API you must ensure that either the Ory Kratos Session Cookie
or the Ory Kratos Session Token are set.
Depending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator
Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
to sign in with the second factor or change the configuration.
You can access this endpoint without credentials when using Ory Kratos'' Admin API.
If this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the
case of an error, the `error.id` of the JSON response body can be one of:
`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
`session_inactive`: No Ory Session was found - sign in a user first.
`security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other
identity logged in instead.
More information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).'
operationId: getSettingsFlow
parameters:
- description: 'ID is the Settings Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/settings?flow=abcde`).'
in: query
name: id
required: true
schema:
type: string
- description: 'The Session Token
When using the SDK in an app without a browser, please include the
session token here.'
in: header
name: X-Session-Token
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/settingsFlow'
description: settingsFlow
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Settings Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/self-service/verification:
post:
description: 'Use this endpoint to complete a verification flow. This endpoint
behaves differently for API and browser flows and has several states:
`choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
and works with API- and Browser-initiated flows.
For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid
and a HTTP 303 See Other redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired).
For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Verification UI URL with the Verification Flow ID appended.
`sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It
works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
`passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a verification link")
does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
(if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with
a new Verification Flow ID which contains an error message that the verification link was invalid.
More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).'
operationId: updateVerificationFlow
parameters:
- description: 'The Verification Flow ID
The value for this parameter comes from `flow` URL Query parameter sent to your
application (e.g. `/verification?flow=abcde`).'
in: query
name: flow
required: true
schema:
type: string
- description: 'Verification Token
The verification token which completes the verification request. If the token
is invalid (e.g. expired) an error will be shown to the end-user.
This parameter is usually set in a link and not used by any direct API call.'
in: query
name: token
schema:
type: string
- description: 'HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header
sent by the client to your server here. This ensures that CSRF and session cookies are respected.'
in: header
name: Cookie
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/updateVerificationFlowBody'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/updateVerificationFlowBody'
required: true
x-originalParamName: Body
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
'303':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Complete Verification Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
/self-service/verification/api:
get:
description: 'This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.
To fetch an existing verification flow call `/self-service/verification/flows?flow=`.
You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server
Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make
you vulnerable to a variety of CSRF attacks.
This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
More information can be found at [Ory Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).'
operationId: createNativeVerificationFlow
parameters:
- description: 'A URL contained in the return_to key of the verification flow.
This piece of data has no effect on the actual logic of the flow and is purely informational.'
in: query
name: return_to
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Verification Flow for Native Apps
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/verification/browser:
get:
description: 'This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to
`selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.
If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects.
This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...).
More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).'
operationId: createBrowserVerificationFlow
parameters:
- description: The URL to return the browser to after the flow was completed.
in: query
name: return_to
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
'303':
$ref: '#/components/responses/emptyResponse'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Create Verification Flow for Browser Clients
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/self-service/verification/flows:
get:
description: 'This endpoint returns a verification flow''s context with, for example, error details and other information.
Browser flows expect the anti-CSRF cookie to be included in the request''s HTTP Cookie Header.
For AJAX requests you must ensure that cookies are included in the request or requests will fail.
If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain
and you need to forward the incoming HTTP Cookie header to this endpoint:
```js
pseudo-code example
router.get(''/recovery'', async function (req, res) {
const flow = await client.getVerificationFlow(req.header(''cookie''), req.query[''flow''])
res.render(''verification'', flow)
})
```
More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation).'
operationId: getVerificationFlow
parameters:
- description: 'The Flow ID
The value for this parameter comes from `request` URL Query parameter sent to your
application (e.g. `/verification?flow=abcde`).'
in: query
name: id
required: true
schema:
type: string
- description: 'HTTP Cookies
When using the SDK on the server side you must include the HTTP Cookie Header
originally sent to your HTTP handler here.'
in: header
name: cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/verificationFlow'
description: verificationFlow
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get Verification Flow
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/sessions:
delete:
description: 'Calling this endpoint invalidates all except the current session that belong to the logged-in user.
Session data are not deleted.'
operationId: disableMyOtherSessions
parameters:
- description: Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
in: header
name: X-Session-Token
schema:
type: string
- description: 'Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that
scenario you must include the HTTP Cookie Header which originally was included in the request to your server.
An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.
It is ok if more than one cookie are included here as all other cookies will be ignored.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/deleteMySessionsCount'
description: deleteMySessionsCount
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Disable my other sessions
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
get:
description: 'This endpoints returns all other active sessions that belong to the logged-in user.
The current session can be retrieved by calling the `/sessions/whoami` endpoint.'
operationId: listMySessions
parameters:
- description: 'Deprecated Items per Page
DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future.
This is the number of items per page.'
in: query
name: per_page
schema:
default: 250
format: int64
maximum: 1000
minimum: 1
type: integer
- description: 'Deprecated Pagination Page
DEPRECATED: Please use `page_token` instead. This parameter will be removed in the future.
This value is currently an integer, but it is not sequential. The value is not the page number, but a
reference. The next page can be any number and some numbers might return an empty list.
For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist.
The first page can be retrieved by omitting this parameter. Following page pointers will be returned in the
`Link` header.'
in: query
name: page
schema:
format: int64
type: integer
- description: 'Page Size
This is the number of items per page to return. For details on pagination please head over to the
[pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).'
in: query
name: page_size
schema:
default: 250
format: int64
maximum: 500
minimum: 1
type: integer
- description: 'Next Page Token
The next page token. For details on pagination please head over to the
[pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination).'
in: query
name: page_token
schema:
type: string
- description: Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
in: header
name: X-Session-Token
schema:
type: string
- description: 'Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that
scenario you must include the HTTP Cookie Header which originally was included in the request to your server.
An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.
It is ok if more than one cookie are included here as all other cookies will be ignored.'
in: header
name: Cookie
schema:
type: string
responses:
'200':
$ref: '#/components/responses/listMySessions'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Get My Active Sessions
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/sessions/token-exchange:
get:
operationId: exchangeSessionToken
parameters:
- description: The part of the code return when initializing the flow.
in: query
name: init_code
required: true
schema:
type: string
- description: The part of the code returned by the return_to URL.
in: query
name: return_to_code
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/successfulNativeLogin'
description: successfulNativeLogin
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'410':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Exchange Session Token
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-medium
/sessions/whoami:
get:
description: 'Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated.
Returns a session object in the body or 401 if the credentials are invalid or no credentials were sent.
When the request it successful it adds the user ID to the ''X-Kratos-Authenticated-Identity-Id'' header
in the response.
If you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:
```js
pseudo-code example
router.get(''/protected-endpoint'', async function (req, res) {
const session = await client.toSession(undefined, req.header(''cookie''))
console.log(session)
})
```
When calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:
```js
pseudo-code example
...
const session = await client.toSession("the-session-token")
console.log(session)
```
When using a token template, the token is included in the `tokenized` field of the session.
```js
pseudo-code example
...
const session = await client.toSession("the-session-token", { tokenize_as: "example-jwt-template" })
console.log(session.tokenized) // The JWT
```
Depending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator
Assurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn
credentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user
to sign in with the second factor or change the configuration.
This endpoint is useful for:
AJAX calls. Remember to send credentials and set up CORS correctly!
Reverse proxies and API Gateways
Server-side calls - use the `X-Session-Token` header!
This endpoint authenticates users by checking:
if the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie;
if the `Authorization: bearer ` HTTP header was set with a valid Ory Kratos Session Token;
if the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.
If none of these headers are set or the cookie or token are invalid, the endpoint returns a HTTP 401 status code.
As explained above, this request may fail due to several reasons. The `error.id` can be one of:
`session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token).
`session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.'
operationId: toSession
parameters:
- description: Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
example: MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj
in: header
name: X-Session-Token
schema:
type: string
- description: 'Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that
scenario you must include the HTTP Cookie Header which originally was included in the request to your server.
An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.
It is ok if more than one cookie are included here as all other cookies will be ignored.'
example: ory_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==
in: header
name: Cookie
schema:
type: string
- description: 'Returns the session additionally as a token (such as a JWT)
The value of this parameter has to be a valid, configured Ory Session token template. For more information head over to [the documentation](http://ory.sh/docs/identities/session-to-jwt-cors).'
in: query
name: tokenize_as
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/session'
description: session
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Check Who the Current HTTP Session Belongs To
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-high
/sessions/{id}:
delete:
description: 'Calling this endpoint invalidates the specified session. The current session cannot be revoked.
Session data are not deleted.'
operationId: disableMySession
parameters:
- description: ID is the session's ID.
in: path
name: id
required: true
schema:
type: string
- description: Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.
in: header
name: X-Session-Token
schema:
type: string
- description: 'Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that
scenario you must include the HTTP Cookie Header which originally was included in the request to your server.
An example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.
It is ok if more than one cookie are included here as all other cookies will be ignored.'
in: header
name: Cookie
schema:
type: string
responses:
'204':
$ref: '#/components/responses/emptyResponse'
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
default:
content:
application/json:
schema:
$ref: '#/components/schemas/errorGeneric'
description: errorGeneric
summary: Disable one of my sessions
tags:
- frontend
x-ory-ratelimit-bucket: kratos-public-low
components:
schemas:
successfulNativeRegistration:
description: The Response for Registration Flows via API
properties:
continue_with:
description: 'Contains a list of actions, that could follow this flow
It can, for example, this will contain a reference to the verification flow, created as part of the user''s
registration or the token of the session.'
items:
$ref: '#/components/schemas/continueWith'
type: array
identity:
$ref: '#/components/schemas/identity'
session:
$ref: '#/components/schemas/session'
session_token:
description: 'The Session Token
This field is only set when the session hook is configured as a post-registration hook.
A session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization
Header:
Authorization: bearer ${session-token}
The session token is only issued for API flows, not for Browser flows!'
type: string
required:
- identity
type: object
continueWithRecoveryUiFlow:
properties:
id:
description: The ID of the recovery flow
format: uuid
type: string
url:
description: 'The URL of the recovery flow
If this value is set, redirect the user''s browser to this URL. This value is typically unset for native clients / API flows.'
type: string
required:
- id
type: object
loginFlow:
description: 'This object represents a login flow. A login flow is initiated at the "Initiate Login API / Browser Flow"
endpoint by a client.
Once a login flow is completed successfully, a session cookie or session token will be issued.'
properties:
active:
description: 'The active login method
If set contains the login method used. If the flow is new, it is unset.
password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
enum:
- password
- oidc
- totp
- lookup_secret
- webauthn
- code
- passkey
- profile
- saml
- deviceauthn
- link_recovery
- code_recovery
type: string
x-go-enum-desc: 'password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
expires_at:
description: 'ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in,
a new flow has to be initiated.'
format: date-time
type: string
id:
description: 'ID represents the flow''s unique ID. When performing the login flow, this
represents the id in the login UI''s query parameter: http:///?flow='
format: uuid
type: string
identity_schema:
description: 'IdentitySchema optionally holds the ID of the identity schema that is used
for this flow. This value can be set by the user when creating the flow and
should be retained when the flow is saved or converted to another flow.'
type: string
issued_at:
description: IssuedAt is the time (UTC) when the flow started.
format: date-time
type: string
oauth2_login_challenge:
description: 'Ory OAuth 2.0 Login Challenge.
This value is set using the `login_challenge` query parameter of the registration and login endpoints.
If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.'
type: string
oauth2_login_request:
$ref: '#/components/schemas/OAuth2LoginRequest'
organization_id:
$ref: '#/components/schemas/NullUUID'
refresh:
description: Refresh stores whether this login flow should enforce re-authentication.
type: boolean
request_url:
description: 'RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL''s path or query for example.'
type: string
requested_aal:
$ref: '#/components/schemas/authenticatorAssuranceLevel'
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
session_token_exchange_code:
description: 'SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the login flow has been completed.
This is only set if the client has requested a session token exchange code, and if the flow is of type "api",
and only on creating the login flow.'
type: string
state:
description: 'State represents the state of this request:
choose_method: ask the user to choose a method to sign in with
sent_email: the email has been sent to the user
passed_challenge: the request was successful and the login challenge was passed.'
transient_payload:
description: TransientPayload is used to pass data from the login to hooks and email templates
type: object
type:
$ref: '#/components/schemas/selfServiceFlowType'
ui:
$ref: '#/components/schemas/uiContainer'
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
required:
- id
- type
- expires_at
- issued_at
- request_url
- ui
- state
title: Login Flow
type: object
OAuth2ConsentRequestOpenIDConnectContext:
description: OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext
properties:
acr_values:
description: 'ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.'
items:
type: string
type: array
display:
description: 'Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.'
type: string
id_token_hint_claims:
additionalProperties: {}
description: IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.
type: object
login_hint:
description: LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.
type: string
ui_locales:
description: UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.
items:
type: string
type: array
type: object
continueWithVerificationUi:
description: Indicates, that the UI flow could be continued by showing a verification ui
properties:
action:
description: 'Action will always be `show_verification_ui`
show_verification_ui ContinueWithActionShowVerificationUIString'
enum:
- show_verification_ui
type: string
x-go-enum-desc: show_verification_ui ContinueWithActionShowVerificationUIString
flow:
$ref: '#/components/schemas/continueWithVerificationUiFlow'
required:
- action
- flow
type: object
uiNode:
description: 'Nodes are represented as HTML elements or their native UI equivalents. For example,
a node can be an `` tag, or an `` but also `some plain text`.'
properties:
attributes:
$ref: '#/components/schemas/uiNodeAttributes'
group:
description: 'Group specifies which group (e.g. password authenticator) this node belongs to.
default DefaultGroup
password PasswordGroup
oidc OpenIDConnectGroup
profile ProfileGroup
link LinkGroup
code CodeGroup
totp TOTPGroup
lookup_secret LookupGroup
webauthn WebAuthnGroup
passkey PasskeyGroup
identifier_first IdentifierFirstGroup
captcha CaptchaGroup
saml SAMLGroup
deviceauthn DeviceAuthnGroup'
enum:
- default
- password
- oidc
- profile
- link
- code
- totp
- lookup_secret
- webauthn
- passkey
- identifier_first
- captcha
- saml
- deviceauthn
type: string
x-go-enum-desc: 'default DefaultGroup
password PasswordGroup
oidc OpenIDConnectGroup
profile ProfileGroup
link LinkGroup
code CodeGroup
totp TOTPGroup
lookup_secret LookupGroup
webauthn WebAuthnGroup
passkey PasskeyGroup
identifier_first IdentifierFirstGroup
captcha CaptchaGroup
saml SAMLGroup
deviceauthn DeviceAuthnGroup'
messages:
$ref: '#/components/schemas/uiTexts'
meta:
$ref: '#/components/schemas/uiNodeMeta'
type:
description: 'The node''s type
text Text
input Input
img Image
a Anchor
script Script
div Division'
enum:
- text
- input
- img
- a
- script
- div
type: string
x-go-enum-desc: 'text Text
input Input
img Image
a Anchor
script Script
div Division'
required:
- type
- group
- attributes
- messages
- meta
title: Node represents a flow's nodes
type: object
continueWithSettingsUiFlow:
properties:
id:
description: The ID of the settings flow
format: uuid
type: string
url:
description: 'The URL of the settings flow
If this value is set, redirect the user''s browser to this URL. This value is typically unset for native clients / API flows.'
type: string
required:
- id
type: object
updateRecoveryFlowBody:
description: Update Recovery Flow Request Body
discriminator:
mapping:
code: '#/components/schemas/updateRecoveryFlowWithCodeMethod'
link: '#/components/schemas/updateRecoveryFlowWithLinkMethod'
propertyName: method
oneOf:
- $ref: '#/components/schemas/updateRecoveryFlowWithLinkMethod'
- $ref: '#/components/schemas/updateRecoveryFlowWithCodeMethod'
sessionAuthenticationMethods:
description: A list of authenticators which were used to authenticate the session.
items:
$ref: '#/components/schemas/sessionAuthenticationMethod'
title: List of (Used) AuthenticationMethods
type: array
uiNodeAttributes:
discriminator:
mapping:
a: '#/components/schemas/uiNodeAnchorAttributes'
div: '#/components/schemas/uiNodeDivisionAttributes'
img: '#/components/schemas/uiNodeImageAttributes'
input: '#/components/schemas/uiNodeInputAttributes'
script: '#/components/schemas/uiNodeScriptAttributes'
text: '#/components/schemas/uiNodeTextAttributes'
propertyName: node_type
oneOf:
- $ref: '#/components/schemas/uiNodeInputAttributes'
- $ref: '#/components/schemas/uiNodeTextAttributes'
- $ref: '#/components/schemas/uiNodeImageAttributes'
- $ref: '#/components/schemas/uiNodeAnchorAttributes'
- $ref: '#/components/schemas/uiNodeScriptAttributes'
- $ref: '#/components/schemas/uiNodeDivisionAttributes'
title: Attributes represents a list of attributes (e.g. `href="foo"` for links).
updateLoginFlowWithWebAuthnMethod:
description: Update Login Flow with WebAuthn Method
properties:
csrf_token:
description: Sending the anti-csrf token is only required for browser login flows.
type: string
identifier:
description: Identifier is the email or username of the user trying to log in.
type: string
method:
description: Method should be set to "webAuthn" when logging in using the WebAuthn strategy.
type: string
transient_payload:
description: Transient data to pass along to any webhooks
type: object
webauthn_login:
description: 'Login a WebAuthn Security Key
This must contain the ID of the WebAuthN connection.'
type: string
required:
- identifier
- method
type: object
logoutFlow:
description: Logout Flow
properties:
logout_token:
description: LogoutToken can be used to perform logout using AJAX.
type: string
logout_url:
description: 'LogoutURL can be opened in a browser to sign the user out.
format: uri'
type: string
required:
- logout_url
- logout_token
type: object
updateRegistrationFlowWithCodeMethod:
description: Update Registration Flow with Code Method
properties:
code:
description: The OTP Code sent to the user
type: string
csrf_token:
description: The CSRF Token
type: string
method:
description: 'Method to use
This field must be set to `code` when using the code method.'
type: string
resend:
description: Resend restarts the flow with a new code
type: string
traits:
description: The identity's traits
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- traits
- method
type: object
uiNodeAnchorAttributes:
properties:
href:
description: 'The link''s href (destination) URL.
format: uri'
type: string
id:
description: A unique identifier
type: string
node_type:
description: 'NodeType represents this node''s types. It is a mirror of `node.type` and
is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is "a".
text Text
input Input
img Image
a Anchor
script Script
div Division'
enum:
- a
type: string
x-go-enum-desc: 'text Text
input Input
img Image
a Anchor
script Script
div Division'
title:
$ref: '#/components/schemas/uiText'
required:
- href
- title
- id
- node_type
title: AnchorAttributes represents the attributes of an anchor node.
type: object
continueWithSettingsUi:
description: Indicates, that the UI flow could be continued by showing a settings ui
properties:
action:
description: 'Action will always be `show_settings_ui`
show_settings_ui ContinueWithActionShowSettingsUIString'
enum:
- show_settings_ui
type: string
x-go-enum-desc: show_settings_ui ContinueWithActionShowSettingsUIString
flow:
$ref: '#/components/schemas/continueWithSettingsUiFlow'
required:
- action
- flow
type: object
uiNodeTextAttributes:
properties:
id:
description: A unique identifier
type: string
node_type:
description: 'NodeType represents this node''s types. It is a mirror of `node.type` and
is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is "text".
text Text
input Input
img Image
a Anchor
script Script
div Division'
enum:
- text
type: string
x-go-enum-desc: 'text Text
input Input
img Image
a Anchor
script Script
div Division'
text:
$ref: '#/components/schemas/uiText'
required:
- text
- id
- node_type
title: TextAttributes represents the attributes of a text node.
type: object
settingsFlow:
description: 'This flow is used when an identity wants to update settings
(e.g. profile data, passwords, ...) in a selfservice manner.
We recommend reading the [User Settings Documentation](../self-service/flows/user-settings)'
properties:
active:
description: 'Active, if set, contains the registration method that is being used. It is initially
not set.'
type: string
continue_with:
description: 'Contains a list of actions, that could follow this flow
It can, for example, contain a reference to the verification flow, created as part of the user''s
registration.'
items:
$ref: '#/components/schemas/continueWith'
type: array
expires_at:
description: 'ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting,
a new flow has to be initiated.'
format: date-time
type: string
id:
description: 'ID represents the flow''s unique ID. When performing the settings flow, this
represents the id in the settings ui''s query parameter: http://?flow='
format: uuid
type: string
identity:
$ref: '#/components/schemas/identity'
issued_at:
description: IssuedAt is the time (UTC) when the flow occurred.
format: date-time
type: string
request_url:
description: 'RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL''s path or query for example.'
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
state:
description: 'State represents the state of this flow. It knows two states:
show_form: No user data has been collected, or it is invalid, and thus the form should be shown.
success: Indicates that the settings flow has been updated successfully with the provided data.
Done will stay true when repeatedly checking. If set to true, done will revert back to false only
when a flow with invalid (e.g. "please use a valid phone number") data was sent.'
transient_payload:
description: TransientPayload is used to pass data from the settings flow to hooks and email templates
type: object
type:
$ref: '#/components/schemas/selfServiceFlowType'
ui:
$ref: '#/components/schemas/uiContainer'
required:
- id
- type
- expires_at
- issued_at
- request_url
- ui
- identity
- state
title: Flow represents a Settings Flow
type: object
nullTime:
format: date-time
title: NullTime implements sql.NullTime functionality.
type: string
continueWithVerificationUiFlow:
properties:
id:
description: The ID of the verification flow
format: uuid
type: string
url:
description: 'The URL of the verification flow
If this value is set, redirect the user''s browser to this URL. This value is typically unset for native clients / API flows.'
type: string
verifiable_address:
description: The address that should be verified in this flow
type: string
required:
- id
- verifiable_address
type: object
updateSettingsFlowBody:
description: Update Settings Flow Request Body
discriminator:
mapping:
lookup_secret: '#/components/schemas/updateSettingsFlowWithLookupMethod'
oidc: '#/components/schemas/updateSettingsFlowWithOidcMethod'
passkey: '#/components/schemas/updateSettingsFlowWithPasskeyMethod'
password: '#/components/schemas/updateSettingsFlowWithPasswordMethod'
profile: '#/components/schemas/updateSettingsFlowWithProfileMethod'
saml: '#/components/schemas/updateSettingsFlowWithSamlMethod'
totp: '#/components/schemas/updateSettingsFlowWithTotpMethod'
webauthn: '#/components/schemas/updateSettingsFlowWithWebAuthnMethod'
propertyName: method
oneOf:
- $ref: '#/components/schemas/updateSettingsFlowWithPasswordMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithProfileMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithOidcMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithSamlMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithTotpMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithWebAuthnMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithLookupMethod'
- $ref: '#/components/schemas/updateSettingsFlowWithPasskeyMethod'
updateRegistrationFlowWithPasskeyMethod:
description: Update Registration Flow with Passkey Method
properties:
csrf_token:
description: CSRFToken is the anti-CSRF token
type: string
method:
description: 'Method
Should be set to "passkey" when trying to add, update, or remove a Passkey.'
type: string
passkey_register:
description: 'Register a WebAuthn Security Key
It is expected that the JSON returned by the WebAuthn registration process
is included here.'
type: string
traits:
description: The identity's traits
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- traits
- method
type: object
errorBrowserLocationChangeRequired:
properties:
error:
$ref: '#/components/schemas/errorGeneric'
redirect_browser_to:
description: Points to where to redirect the user to next.
type: string
title: Is sent when a flow requires a browser to change its location.
type: object
updateLoginFlowWithPasswordMethod:
description: Update Login Flow with Password Method
properties:
csrf_token:
description: Sending the anti-csrf token is only required for browser login flows.
type: string
identifier:
description: Identifier is the email or username of the user trying to log in.
type: string
method:
description: Method should be set to "password" when logging in using the identifier and password strategy.
type: string
password:
description: The user's password.
type: string
password_identifier:
description: 'Identifier is the email or username of the user trying to log in.
This field is deprecated!'
type: string
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- method
- password
- identifier
type: object
uiNodeScriptAttributes:
properties:
async:
description: The script async type
type: boolean
crossorigin:
description: The script cross origin policy
type: string
id:
description: A unique identifier
type: string
integrity:
description: The script's integrity hash
type: string
node_type:
description: 'NodeType represents this node''s types. It is a mirror of `node.type` and
is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is "script".
text Text
input Input
img Image
a Anchor
script Script
div Division'
enum:
- script
type: string
x-go-enum-desc: 'text Text
input Input
img Image
a Anchor
script Script
div Division'
nonce:
description: 'Nonce for CSP
A nonce you may want to use to improve your Content Security Policy.
You do not have to use this value but if you want to improve your CSP
policies you may use it. You can also choose to use your own nonce value!'
type: string
referrerpolicy:
description: The script referrer policy
type: string
src:
description: The script source
type: string
type:
description: The script MIME type
type: string
required:
- src
- async
- referrerpolicy
- crossorigin
- integrity
- type
- id
- nonce
- node_type
title: ScriptAttributes represent script nodes which load javascript.
type: object
updateSettingsFlowWithSamlMethod:
description: Update settings flow using SAML
properties:
csrf_token:
description: The CSRF Token
type: string
flow:
description: 'Flow ID is the flow''s ID.
in: query'
type: string
link:
description: 'Link this provider
Either this or `unlink` must be set.
type: string
in: body'
type: string
method:
description: 'Method
Should be set to saml when trying to update a profile.'
type: string
traits:
description: 'The identity''s traits
in: body'
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
unlink:
description: 'Unlink this provider
Either this or `link` must be set.
type: string
in: body'
type: string
required:
- method
type: object
identityVerifiableAddressStatus:
description: VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema
type: string
updateLoginFlowWithLookupSecretMethod:
description: Update Login Flow with Lookup Secret Method
properties:
csrf_token:
description: Sending the anti-csrf token is only required for browser login flows.
type: string
lookup_secret:
description: The lookup secret.
type: string
method:
description: Method should be set to "lookup_secret" when logging in using the lookup_secret strategy.
type: string
required:
- method
- lookup_secret
type: object
OAuth2Client:
properties:
access_token_strategy:
description: OAuth 2.0 Access Token Strategy AccessTokenStrategy is the strategy used to generate access tokens. Valid options are `jwt` and `opaque`. `jwt` is a bad idea, see https://www.ory.sh/docs/hydra/advanced#json-web-tokens Setting the stragegy here overrides the global setting in `strategies.access_token`.
type: string
allowed_cors_origins:
items:
type: string
type: array
audience:
items:
type: string
type: array
authorization_code_grant_access_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
authorization_code_grant_id_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
authorization_code_grant_refresh_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
backchannel_logout_session_required:
description: OpenID Connect Back-Channel Logout Session Required Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.
type: boolean
backchannel_logout_uri:
description: OpenID Connect Back-Channel Logout URI RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.
type: string
client_credentials_grant_access_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
client_id:
description: OAuth 2.0 Client ID The ID is immutable. If no ID is provided, a UUID4 will be generated.
type: string
client_name:
description: OAuth 2.0 Client Name The human-readable name of the client to be presented to the end-user during authorization.
type: string
client_secret:
description: OAuth 2.0 Client Secret The secret will be included in the create request as cleartext, and then never again. The secret is kept in hashed format and is not recoverable once lost.
type: string
client_secret_expires_at:
description: OAuth 2.0 Client Secret Expires At The field is currently not supported and its value is always 0.
format: int64
type: integer
client_uri:
description: OAuth 2.0 Client URI ClientURI is a URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.
type: string
contacts:
items:
type: string
type: array
created_at:
description: OAuth 2.0 Client Creation Date CreatedAt returns the timestamp of the client's creation.
format: date-time
type: string
frontchannel_logout_session_required:
description: OpenID Connect Front-Channel Logout Session Required Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.
type: boolean
frontchannel_logout_uri:
description: OpenID Connect Front-Channel Logout URI RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.
type: string
grant_types:
items:
type: string
type: array
implicit_grant_access_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
implicit_grant_id_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
jwks:
description: OAuth 2.0 Client JSON Web Key Set Client's JSON Web Key Set [JWK] document, passed by value. The semantics of the jwks parameter are the same as the jwks_uri parameter, other than that the JWK Set is passed by value, rather than by reference. This parameter is intended only to be used by Clients that, for some reason, are unable to use the jwks_uri parameter, for instance, by native applications that might not have a location to host the contents of the JWK Set. If a Client can use jwks_uri, it MUST NOT use jwks. One significant downside of jwks is that it does not enable key rotation (which jwks_uri does, as described in Section 10 of OpenID Connect Core 1.0 [OpenID.Core]). The jwks_uri and jwks parameters MUST NOT be used together.
jwks_uri:
description: OAuth 2.0 Client JSON Web Key Set URL URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.
type: string
jwt_bearer_grant_access_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
logo_uri:
description: OAuth 2.0 Client Logo URI A URL string referencing the client's logo.
type: string
metadata: {}
owner:
description: OAuth 2.0 Client Owner Owner is a string identifying the owner of the OAuth 2.0 Client.
type: string
policy_uri:
description: OAuth 2.0 Client Policy URI PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.
type: string
post_logout_redirect_uris:
items:
type: string
type: array
redirect_uris:
items:
type: string
type: array
refresh_token_grant_access_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
refresh_token_grant_id_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
refresh_token_grant_refresh_token_lifespan:
description: Specify a time duration in milliseconds, seconds, minutes, hours.
type: string
registration_access_token:
description: OpenID Connect Dynamic Client Registration Access Token RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client. It is sent when creating a client using Dynamic Client Registration.
type: string
registration_client_uri:
description: OpenID Connect Dynamic Client Registration URL RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.
type: string
request_object_signing_alg:
description: OpenID Connect Request Object Signing Algorithm JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.
type: string
request_uris:
items:
type: string
type: array
response_types:
items:
type: string
type: array
scope:
description: OAuth 2.0 Client Scope Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.
type: string
sector_identifier_uri:
description: OpenID Connect Sector Identifier URI URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.
type: string
skip_consent:
description: SkipConsent skips the consent screen for this client. This field can only be set from the admin API.
type: boolean
skip_logout_consent:
description: SkipLogoutConsent skips the logout consent screen for this client. This field can only be set from the admin API.
type: boolean
subject_type:
description: OpenID Connect Subject Type The `subject_types_supported` Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.
type: string
token_endpoint_auth_method:
description: 'OAuth 2.0 Token Endpoint Authentication Method Requested Client Authentication method for the Token Endpoint. The options are: `client_secret_basic`: (default) Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` encoded in the HTTP Authorization header. `client_secret_post`: Send `client_id` and `client_secret` as `application/x-www-form-urlencoded` in the HTTP body. `private_key_jwt`: Use JSON Web Tokens to authenticate the client. `none`: Used for public clients (native apps, mobile apps) which can not have secrets.'
type: string
token_endpoint_auth_signing_alg:
description: OAuth 2.0 Token Endpoint Signing Algorithm Requested Client Authentication signing algorithm for the Token Endpoint.
type: string
tos_uri:
description: OAuth 2.0 Client Terms of Service URI A URL string pointing to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.
type: string
updated_at:
description: OAuth 2.0 Client Last Update Date UpdatedAt returns the timestamp of the last update.
format: date-time
type: string
userinfo_signed_response_alg:
description: OpenID Connect Request Userinfo Signed Response Algorithm JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.
type: string
title: OAuth2Client OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
type: object
updateSettingsFlowWithPasswordMethod:
description: Update Settings Flow with Password Method
properties:
csrf_token:
description: CSRFToken is the anti-CSRF token
type: string
method:
description: 'Method
Should be set to password when trying to update a password.'
type: string
password:
description: Password is the updated password
type: string
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- password
- method
type: object
continueWith:
discriminator:
mapping:
redirect_browser_to: '#/components/schemas/continueWithRedirectBrowserTo'
set_ory_session_token: '#/components/schemas/continueWithSetOrySessionToken'
show_recovery_ui: '#/components/schemas/continueWithRecoveryUi'
show_settings_ui: '#/components/schemas/continueWithSettingsUi'
show_verification_ui: '#/components/schemas/continueWithVerificationUi'
propertyName: action
oneOf:
- $ref: '#/components/schemas/continueWithVerificationUi'
- $ref: '#/components/schemas/continueWithSetOrySessionToken'
- $ref: '#/components/schemas/continueWithSettingsUi'
- $ref: '#/components/schemas/continueWithRecoveryUi'
- $ref: '#/components/schemas/continueWithRedirectBrowserTo'
type: object
verificationFlow:
description: 'Used to verify an out-of-band communication
channel such as an email address or a phone number.
For more information head over to: https://www.ory.com/docs/kratos/self-service/flows/verify-email-account-activation'
properties:
active:
description: 'Active, if set, contains the registration method that is being used. It is initially
not set.'
type: string
expires_at:
description: 'ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address,
a new request has to be initiated.'
format: date-time
type: string
id:
description: 'ID represents the request''s unique ID. When performing the verification flow, this
represents the id in the verify ui''s query parameter: http://?request=
type: string
format: uuid'
format: uuid
type: string
issued_at:
description: IssuedAt is the time (UTC) when the request occurred.
format: date-time
type: string
request_url:
description: 'RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL''s path or query for example.'
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
state:
description: 'State represents the state of this request:
choose_method: ask the user to choose a method (e.g. verify your email)
sent_email: the email has been sent to the user
passed_challenge: the request was successful and the verification challenge was passed.'
transient_payload:
description: TransientPayload is used to pass data from the verification flow to hooks and email templates
type: object
type:
$ref: '#/components/schemas/selfServiceFlowType'
ui:
$ref: '#/components/schemas/uiContainer'
required:
- id
- type
- ui
- state
title: A Verification Flow
type: object
updateRegistrationFlowWithWebAuthnMethod:
description: Update Registration Flow with WebAuthn Method
properties:
csrf_token:
description: CSRFToken is the anti-CSRF token
type: string
method:
description: 'Method
Should be set to "webauthn" when trying to add, update, or remove a webAuthn pairing.'
type: string
traits:
description: The identity's traits
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
webauthn_register:
description: 'Register a WebAuthn Security Key
It is expected that the JSON returned by the WebAuthn registration process
is included here.'
type: string
webauthn_register_displayname:
description: 'Name of the WebAuthn Security Key to be Added
A human-readable name for the security key which will be added.'
type: string
required:
- traits
- method
type: object
updateLoginFlowWithTotpMethod:
description: Update Login Flow with TOTP Method
properties:
csrf_token:
description: Sending the anti-csrf token is only required for browser login flows.
type: string
method:
description: Method should be set to "totp" when logging in using the TOTP strategy.
type: string
totp_code:
description: The TOTP code.
type: string
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- method
- totp_code
type: object
updateRecoveryFlowWithLinkMethod:
description: Update Recovery Flow with Link Method
properties:
csrf_token:
description: Sending the anti-csrf token is only required for browser login flows.
type: string
email:
description: 'Email to Recover
Needs to be set when initiating the flow. If the email is a registered
recovery email, a recovery link will be sent. If the email is not known,
an email with details on what happened will be sent instead.
format: email'
type: string
method:
description: 'Method is the method that should be used for this recovery flow
Allowed values are `link` and `code`
link RecoveryStrategyLink
code RecoveryStrategyCode'
enum:
- link
- code
type: string
x-go-enum-desc: 'link RecoveryStrategyLink
code RecoveryStrategyCode'
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- email
- method
type: object
webAuthnJavaScript:
type: string
createFedcmFlowResponse:
description: Contains a list of all available FedCM providers.
properties:
csrf_token:
type: string
providers:
items:
$ref: '#/components/schemas/Provider'
type: array
title: CreateFedcmFlowResponse
type: object
uiText:
properties:
context:
description: The message's context. Useful when customizing messages.
type: object
id:
$ref: '#/components/schemas/ID'
text:
description: The message text. Written in american english.
type: string
type:
description: 'The message type.
info Info
error Error
success Success'
enum:
- info
- error
- success
type: string
x-go-enum-desc: 'info Info
error Error
success Success'
required:
- id
- text
- type
type: object
verifiableIdentityAddress:
description: VerifiableAddress is an identity's verifiable address
properties:
created_at:
description: When this entry was created
example: '2014-01-01T23:28:56.782Z'
format: date-time
type: string
id:
description: The ID
format: uuid
type: string
status:
$ref: '#/components/schemas/identityVerifiableAddressStatus'
updated_at:
description: When this entry was last updated
example: '2014-01-01T23:28:56.782Z'
format: date-time
type: string
value:
description: 'The address value
example foo@user.com'
type: string
verified:
description: Indicates if the address has already been verified
example: true
type: boolean
verified_at:
$ref: '#/components/schemas/nullTime'
via:
description: The delivery method
enum:
- email
- sms
example: email
type: string
required:
- value
- verified
- via
- status
type: object
registrationFlow:
properties:
active:
description: 'Active, if set, contains the registration method that is being used. It is initially
not set.
password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
enum:
- password
- oidc
- totp
- lookup_secret
- webauthn
- code
- passkey
- profile
- saml
- deviceauthn
- link_recovery
- code_recovery
type: string
x-go-enum-desc: 'password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
expires_at:
description: 'ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in,
a new flow has to be initiated.'
format: date-time
type: string
id:
description: 'ID represents the flow''s unique ID. When performing the registration flow, this
represents the id in the registration ui''s query parameter: http:///?flow='
format: uuid
type: string
identity_schema:
description: 'IdentitySchema optionally holds the ID of the identity schema that is used
for this flow. This value can be set by the user when creating the flow and
should be retained when the flow is saved or converted to another flow.'
type: string
issued_at:
description: IssuedAt is the time (UTC) when the flow occurred.
format: date-time
type: string
oauth2_login_challenge:
description: 'Ory OAuth 2.0 Login Challenge.
This value is set using the `login_challenge` query parameter of the registration and login endpoints.
If set will cooperate with Ory OAuth2 and OpenID to act as an OAuth2 server / OpenID Provider.'
type: string
oauth2_login_request:
$ref: '#/components/schemas/OAuth2LoginRequest'
organization_id:
$ref: '#/components/schemas/NullUUID'
request_url:
description: 'RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL''s path or query for example.'
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
session_token_exchange_code:
description: 'SessionTokenExchangeCode holds the secret code that the client can use to retrieve a session token after the flow has been completed.
This is only set if the client has requested a session token exchange code, and if the flow is of type "api",
and only on creating the flow.'
type: string
state:
description: 'State represents the state of this request:
choose_method: ask the user to choose a method (e.g. registration with email)
sent_email: the email has been sent to the user
passed_challenge: the request was successful and the registration challenge was passed.'
transient_payload:
description: TransientPayload is used to pass data from the registration to a webhook
type: object
type:
$ref: '#/components/schemas/selfServiceFlowType'
ui:
$ref: '#/components/schemas/uiContainer'
required:
- id
- type
- expires_at
- issued_at
- request_url
- ui
- state
type: object
authenticatorAssuranceLevel:
description: 'The authenticator assurance level can be one of "aal1", "aal2", or "aal3". A higher number means that it is harder
for an attacker to compromise the account.
Generally, "aal1" implies that one authentication factor was used while AAL2 implies that two factors (e.g.
password + TOTP) have been used.
To learn more about these levels please head over to: https://www.ory.com/kratos/docs/concepts/credentials'
enum:
- aal0
- aal1
- aal2
- aal3
title: Authenticator Assurance Level (AAL)
type: string
updateSettingsFlowWithTotpMethod:
description: Update Settings Flow with TOTP Method
properties:
csrf_token:
description: CSRFToken is the anti-CSRF token
type: string
method:
description: 'Method
Should be set to "totp" when trying to add, update, or remove a totp pairing.'
type: string
totp_code:
description: ValidationTOTP must contain a valid TOTP based on the
type: string
totp_unlink:
description: 'UnlinkTOTP if true will remove the TOTP pairing,
effectively removing the credential. This can be used
to set up a new TOTP device.'
type: boolean
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- method
type: object
JSONRawMessage:
title: JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger.
type: object
session:
description: A Session
properties:
active:
description: Active state. If false the session is no longer active.
type: boolean
authenticated_at:
description: 'The Session Authentication Timestamp
When this session was authenticated at. If multi-factor authentication was used this
is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).'
format: date-time
type: string
authentication_methods:
$ref: '#/components/schemas/sessionAuthenticationMethods'
authenticator_assurance_level:
$ref: '#/components/schemas/authenticatorAssuranceLevel'
devices:
description: Devices has history of all endpoints where the session was used
items:
$ref: '#/components/schemas/sessionDevice'
type: array
expires_at:
description: 'The Session Expiry
When this session expires at.'
format: date-time
type: string
id:
description: Session ID
format: uuid
type: string
identity:
$ref: '#/components/schemas/identity'
issued_at:
description: 'The Session Issuance Timestamp
When this session was issued at. Usually equal or close to `authenticated_at`.'
format: date-time
type: string
tokenized:
description: 'Tokenized is the tokenized (e.g. JWT) version of the session.
It is only set when the `tokenize_as` query parameter was set to a valid tokenize template during calls to `/session/whoami`.'
type: string
required:
- id
type: object
NullUUID:
format: uuid4
nullable: true
type: string
sessionAuthenticationMethod:
description: A singular authenticator used during authentication / login.
properties:
aal:
$ref: '#/components/schemas/authenticatorAssuranceLevel'
completed_at:
description: When the authentication challenge was completed.
format: date-time
type: string
method:
description: 'The method used in this authenticator.
password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
enum:
- password
- oidc
- totp
- lookup_secret
- webauthn
- code
- passkey
- profile
- saml
- deviceauthn
- link_recovery
- code_recovery
type: string
x-go-enum-desc: 'password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
organization:
description: The Organization id used for authentication
type: string
provider:
description: OIDC or SAML provider id used for authentication
type: string
upstream_acr:
description: 'UpstreamACR is the `acr` claim reported by the upstream OIDC
provider, if any. Populated only for OIDC login methods when the
upstream ID token contained an `acr` claim.'
type: string
upstream_amr:
description: 'UpstreamAMR is the `amr` claim reported by the upstream OIDC
provider, if any. Populated only for OIDC login methods when the
upstream ID token contained an `amr` claim.'
items:
type: string
type: array
title: AuthenticationMethod identifies an authentication method
type: object
uiNodeInputAttributesOption:
description: 'Represents a single selectable value for an input whose JSON schema
defined an `enum`. The value is always a scalar JSON type (string, number,
or boolean) serialized verbatim from the schema. When present, clients
should render the parent input as a select/dropdown.'
properties:
value:
description: 'The value that will be submitted when this option is picked.
It is serialized verbatim from the JSON schema `enum` entry, so it is
always a scalar JSON value (string, number, or boolean).'
required:
- value
type: object
genericError:
properties:
code:
description: The status code
example: 404
format: int64
type: integer
debug:
description: 'Debug information
This field is often not exposed to protect against leaking
sensitive information.'
example: SQL field "foo" is not a bool.
type: string
details:
additionalProperties: false
description: Further error details
type: object
id:
description: 'The error ID
Useful when trying to identify various errors in application logic.'
type: string
message:
description: 'Error message
The error''s message.'
example: The resource could not be found
type: string
reason:
description: A human-readable reason for the error
example: User with ID 1234 does not exist.
type: string
request:
description: 'The request ID
The request ID is often exposed internally in order to trace
errors across service architectures. This is often a UUID.'
example: d7ef54b1-ec15-46e6-bccb-524b82c035e6
type: string
status:
description: The status description
example: Not Found
type: string
required:
- message
type: object
selfServiceFlowType:
description: The flow type can either be `api` or `browser`.
title: Type is the flow type.
type: string
updateRecoveryFlowWithCodeMethod:
description: Update Recovery Flow with Code Method
properties:
code:
description: 'Code from the recovery email
If you want to submit a code, use this field, but make sure to _not_ include the email field, as well.'
type: string
csrf_token:
description: Sending the anti-csrf token is only required for browser login flows.
type: string
email:
description: 'The email address of the account to recover
If the email belongs to a valid account, a recovery email will be sent.
If you want to notify the email address if the account does not exist, see
the [notify_unknown_recipients flag](https://www.ory.com/docs/kratos/self-service/flows/account-recovery-password-reset#attempted-recovery-notifications)
If a code was already sent, including this field in the payload will invalidate the sent code and re-send a new code.
format: email'
type: string
method:
description: 'Method is the method that should be used for this recovery flow
Allowed values are `link` and `code`.
link RecoveryStrategyLink
code RecoveryStrategyCode'
enum:
- link
- code
type: string
x-go-enum-desc: 'link RecoveryStrategyLink
code RecoveryStrategyCode'
recovery_address:
description: 'A recovery address that is registered for the user.
It can be an email, a phone number (to receive the code via SMS), etc.
Used in RecoveryV2.'
type: string
recovery_confirm_address:
description: 'If there are multiple recovery addresses registered for the user, and the initially provided address
is different from the address chosen when the choice (of masked addresses) is presented, then we need to make sure
that the user actually knows the full address to avoid information exfiltration, so we ask for the full address.
Used in RecoveryV2.'
type: string
recovery_select_address:
description: 'If there are multiple addresses registered for the user, a choice is presented and this field
stores the result of this choice.
Addresses are ''masked'' (never sent in full to the client and shown partially in the UI) since at this point in the recovery flow,
the user has not yet proven that it knows the full address and we want to avoid
information exfiltration.
So for all intents and purposes, the value of this field should be treated as an opaque identifier.
Used in RecoveryV2.'
type: string
screen:
description: 'Set to "previous" to go back in the flow, meaningfully.
Used in RecoveryV2.'
type: string
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- method
type: object
updateRegistrationFlowWithProfileMethod:
description: Update Registration Flow with Profile Method
properties:
csrf_token:
description: 'The Anti-CSRF Token
This token is only required when performing browser flows.'
type: string
method:
description: 'Method
Should be set to profile when trying to update a profile.'
type: string
screen:
description: 'Screen requests navigation to a previous screen.
This must be set to credential-selection to go back to the credential
selection screen.
credential-selection RegistrationScreenCredentialSelection nolint:gosec // not a credential
previous RegistrationScreenPrevious'
enum:
- credential-selection
- previous
type: string
x-go-enum-desc: 'credential-selection RegistrationScreenCredentialSelection nolint:gosec // not a credential
previous RegistrationScreenPrevious'
traits:
description: 'Traits
The identity''s traits.'
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
required:
- traits
- method
type: object
identityCredentials:
description: Credentials represents a specific credential type
properties:
config:
$ref: '#/components/schemas/JSONRawMessage'
created_at:
description: CreatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
identifiers:
description: Identifiers represent a list of unique identifiers this credential type matches.
items:
type: string
type: array
type:
description: 'Type discriminates between different types of credentials.
password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
enum:
- password
- oidc
- totp
- lookup_secret
- webauthn
- code
- passkey
- profile
- saml
- deviceauthn
- link_recovery
- code_recovery
type: string
x-go-enum-desc: 'password CredentialsTypePassword
oidc CredentialsTypeOIDC
totp CredentialsTypeTOTP
lookup_secret CredentialsTypeLookup
webauthn CredentialsTypeWebAuthn
code CredentialsTypeCodeAuth
passkey CredentialsTypePasskey
profile CredentialsTypeProfile
saml CredentialsTypeSAML
deviceauthn CredentialsTypeDeviceAuthn
link_recovery CredentialsTypeRecoveryLink CredentialsTypeRecoveryLink is a special credential type linked to the link strategy (recovery flow). It is not used within the credentials object itself.
code_recovery CredentialsTypeRecoveryCode'
updated_at:
description: UpdatedAt is a helper struct field for gobuffalo.pop.
format: date-time
type: string
version:
description: Version refers to the version of the credential. Useful when changing the config schema.
format: int64
type: integer
type: object
continueWithRedirectBrowserTo:
description: Indicates, that the UI flow could be continued by showing a recovery ui
properties:
action:
description: 'Action will always be `redirect_browser_to`
redirect_browser_to ContinueWithActionRedirectBrowserToString'
enum:
- redirect_browser_to
type: string
x-go-enum-desc: redirect_browser_to ContinueWithActionRedirectBrowserToString
redirect_browser_to:
description: The URL to redirect the browser to
type: string
required:
- action
- redirect_browser_to
type: object
updateRegistrationFlowBody:
description: Update Registration Request Body
discriminator:
mapping:
code: '#/components/schemas/updateRegistrationFlowWithCodeMethod'
oidc: '#/components/schemas/updateRegistrationFlowWithOidcMethod'
passkey: '#/components/schemas/updateRegistrationFlowWithPasskeyMethod'
password: '#/components/schemas/updateRegistrationFlowWithPasswordMethod'
profile: '#/components/schemas/updateRegistrationFlowWithProfileMethod'
saml: '#/components/schemas/updateRegistrationFlowWithSamlMethod'
webauthn: '#/components/schemas/updateRegistrationFlowWithWebAuthnMethod'
propertyName: method
oneOf:
- $ref: '#/components/schemas/updateRegistrationFlowWithPasswordMethod'
- $ref: '#/components/schemas/updateRegistrationFlowWithOidcMethod'
- $ref: '#/components/schemas/updateRegistrationFlowWithSamlMethod'
- $ref: '#/components/schemas/updateRegistrationFlowWithWebAuthnMethod'
- $ref: '#/components/schemas/updateRegistrationFlowWithCodeMethod'
- $ref: '#/components/schemas/updateRegistrationFlowWithPasskeyMethod'
- $ref: '#/components/schemas/updateRegistrationFlowWithProfileMethod'
updateLoginFlowWithOidcMethod:
description: Update Login Flow with OpenID Connect Method
properties:
csrf_token:
description: The CSRF Token
type: string
id_token:
description: 'IDToken is an optional id token provided by an OIDC provider
If submitted, it is verified using the OIDC provider''s public key set and the claims are used to populate
the OIDC credentials of the identity.
If the OIDC provider does not store additional claims (such as name, etc.) in the IDToken itself, you can use
the `traits` field to populate the identity''s traits. Note, that Apple only includes the users email in the IDToken.
Supported providers are
Apple
Google'
type: string
id_token_nonce:
description: 'IDTokenNonce is the nonce, used when generating the IDToken.
If the provider supports nonce validation, the nonce will be validated against this value and required.'
type: string
method:
description: 'Method to use
This field must be set to `oidc` when using the oidc method.'
type: string
provider:
description: The provider to register with
type: string
traits:
description: The identity traits. This is a placeholder for the registration flow.
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
upstream_parameters:
description: 'UpstreamParameters are the parameters that are passed to the upstream identity provider.
These parameters are optional and depend on what the upstream identity provider supports.
Supported parameters are:
`login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session.
`hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`.
`prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`.
`acr_values` (string): The `acr_values` specifies the Authentication Context Class Reference values for the authorization request.'
type: object
required:
- provider
- method
type: object
uiNodes:
items:
$ref: '#/components/schemas/uiNode'
type: array
uiNodeImageAttributes:
properties:
height:
description: Height of the image
format: int64
type: integer
id:
description: A unique identifier
type: string
node_type:
description: 'NodeType represents this node''s types. It is a mirror of `node.type` and
is primarily used to allow compatibility with OpenAPI 3.0. In this struct it technically always is "img".
text Text
input Input
img Image
a Anchor
script Script
div Division'
enum:
- img
type: string
x-go-enum-desc: 'text Text
input Input
img Image
a Anchor
script Script
div Division'
src:
description: 'The image''s source URL.
format: uri'
type: string
width:
description: Width of the image
format: int64
type: integer
required:
- src
- id
- width
- height
- node_type
title: ImageAttributes represents the attributes of an image node.
type: object
continueWithSetOrySessionToken:
description: Indicates that a session was issued, and the application should use this token for authenticated requests
properties:
action:
description: 'Action will always be `set_ory_session_token`
set_ory_session_token ContinueWithActionSetOrySessionTokenString'
enum:
- set_ory_session_token
type: string
x-go-enum-desc: set_ory_session_token ContinueWithActionSetOrySessionTokenString
ory_session_token:
description: Token is the token of the session
type: string
required:
- action
- ory_session_token
type: object
performNativeLogoutBody:
description: Perform Native Logout Request Body
properties:
session_token:
description: 'The Session Token
Invalidate this session token.'
type: string
required:
- session_token
type: object
ID:
format: int64
type: integer
updateSettingsFlowWithPasskeyMethod:
description: Update Settings Flow with Passkey Method
properties:
csrf_token:
description: CSRFToken is the anti-CSRF token
type: string
method:
description: 'Method
Should be set to "passkey" when trying to add, update, or remove a webAuthn pairing.'
type: string
passkey_remove:
description: 'Remove a WebAuthn Security Key
This must contain the ID of the WebAuthN connection.'
type: string
passkey_settings_register:
description: 'Register a WebAuthn Security Key
It is expected that the JSON returned by the WebAuthn registration process
is included here.'
type: string
required:
- method
type: object
updateSettingsFlowWithOidcMethod:
description: Update Settings Flow with OpenID Connect Method
properties:
flow:
description: 'Flow ID is the flow''s ID.
in: query'
type: string
link:
description: 'Link this provider
Either this or `unlink` must be set.
type: string
in: body'
type: string
method:
description: 'Method
Should be set to profile when trying to update a profile.'
type: string
traits:
description: 'The identity''s traits
in: body'
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
unlink:
description: 'Unlink this provider
Either this or `link` must be set.
type: string
in: body'
type: string
upstream_parameters:
description: 'UpstreamParameters are the parameters that are passed to the upstream identity provider.
These parameters are optional and depend on what the upstream identity provider supports.
Supported parameters are:
`login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session.
`hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`.
`prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`.
`acr_values` (string): The `acr_values` specifies the Authentication Context Class Reference values for the authorization request.'
type: object
required:
- method
type: object
deleteMySessionsCount:
description: Deleted Session Count
properties:
count:
description: The number of sessions that were revoked.
format: int64
type: integer
type: object
OAuth2LoginRequest:
description: OAuth2LoginRequest struct for OAuth2LoginRequest
properties:
challenge:
description: ID is the identifier (\"login challenge\") of the login request. It is used to identify the session.
type: string
client:
$ref: '#/components/schemas/OAuth2Client'
oidc_context:
$ref: '#/components/schemas/OAuth2ConsentRequestOpenIDConnectContext'
request_url:
description: RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters.
type: string
requested_access_token_audience:
items:
type: string
type: array
requested_scope:
items:
type: string
type: array
session_id:
description: SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \"sid\" parameter in the ID Token and in OIDC Front-/Back- channel logout. It's value can generally be used to associate consecutive login requests by a certain user.
type: string
skip:
description: Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL. This feature allows you to update / set session information.
type: boolean
subject:
description: Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and `skip` is true, you MUST include this subject type when accepting the login request, or the request will fail.
type: string
type: object
updateRegistrationFlowWithOidcMethod:
description: Update Registration Flow with OpenID Connect Method
properties:
csrf_token:
description: The CSRF Token
type: string
id_token:
description: 'IDToken is an optional id token provided by an OIDC provider
If submitted, it is verified using the OIDC provider''s public key set and the claims are used to populate
the OIDC credentials of the identity.
If the OIDC provider does not store additional claims (such as name, etc.) in the IDToken itself, you can use
the `traits` field to populate the identity''s traits. Note, that Apple only includes the users email in the IDToken.
Supported providers are
Apple
Google'
type: string
id_token_nonce:
description: 'IDTokenNonce is the nonce, used when generating the IDToken.
If the provider supports nonce validation, the nonce will be validated against this value and is required.'
type: string
method:
description: 'Method to use
This field must be set to `oidc` when using the oidc method.'
type: string
provider:
description: The provider to register with
type: string
traits:
description: The identity traits
type: object
transient_payload:
description: Transient data to pass along to any webhooks
type: object
upstream_parameters:
description: 'UpstreamParameters are the parameters that are passed to the upstream identity provider.
These parameters are optional and depend on what the upstream identity provider supports.
Supported parameters are:
`login_hint` (string): The `login_hint` parameter suppresses the account chooser and either pre-fills the email box on the sign-in form, or selects the proper session.
`hd` (string): The `hd` parameter limits the login/registration process to a Google Organization, e.g. `mycollege.edu`.
`prompt` (string): The `prompt` specifies whether the Authorization Server prompts the End-User for reauthentication and consent, e.g. `select_account`.
`acr_values` (string): The `acr_values` specifies the Authentication Context Class Reference values for the authorization request.'
type: object
required:
- provider
- method
type: object
nullJsonRawMessage:
description: NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
nullable: true
updateVerificationFlowBody:
description: Update Verification Flow Request Body
discriminator:
mapping:
code: '#/components/schemas/updateVerificationFlowWithCodeMethod'
link: '#/components/schemas/updateVerificationFlowWithLinkMethod'
propertyName: method
oneOf:
- $ref: '#/components/schemas/updateVerificationFlowWithLinkMethod'
- $ref: '#/components/schemas/updateVerificationFlowWithCodeMethod'
recoveryFlow:
description: 'This request is used when an identity wants to recover their account.
We recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery)'
properties:
active:
description: 'Active, if set, contains the recovery method that is being used. It is initially
not set.'
type: string
continue_with:
description: Contains possible actions that could follow this flow
items:
$ref: '#/components/schemas/continueWith'
type: array
expires_at:
description: 'ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting,
a new request has to be initiated.'
format: date-time
type: string
id:
description: 'ID represents the request''s unique ID. When performing the recovery flow, this
represents the id in the recovery ui''s query parameter: http://?request='
format: uuid
type: string
issued_at:
description: IssuedAt is the time (UTC) when the request occurred.
format: date-time
type: string
request_url:
description: 'RequestURL is the initial URL that was requested from Ory Kratos. It can be used
to forward information contained in the URL''s path or query for example.'
type: string
return_to:
description: ReturnTo contains the requested return_to URL.
type: string
state:
description: 'State represents the state of this request:
choose_method: ask the user to choose a method (e.g. recover account via email)
sent_email: the email has been sent to the user
passed_challenge: the request was successful and the recovery challenge was passed.'
transient_payload:
description: TransientPayload is used to pass data from the recovery flow to hooks and email templates
type: object
type:
$ref: '#/components/schemas/selfServiceFlowType'
ui:
$ref: '#/components/schemas/uiContainer'
required:
- id
- type
- expires_at
- issued_at
- request_url
- ui
- state
title: A Recovery Flow
type: object
identityTraits:
description: 'Traits represent an identity''s traits. The identity is able to create, modify, and delete traits
in a self-service manner. The input will always be validated against the JSON Schema defined
in `schema_url`.'
uiContainer:
description: Container represents a HTML Form. The container can work with both HTTP Form and JSON requests
properties:
action:
description: Action should be used as the form action URL `