Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

App-native authentication API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/oauth2

The WSO2 Identity Platform - Application-native Authentication Rest API (version v1).

Download the OpenAPI definition (YAML)

Other​

GET /authorize​

GET /authorize

This API is used to initiate application-native authentication.

*While this is not an API specific to app-native authentication, a standard OAuth2 authorization request is used to initiate app-native authentication with the exception of setting the response_mode to direct. Subsequent requests should be made to the /authn endpoint described under Handle Authentication.

Parameters

NameInTypeRequiredDescription
response_typequerystringYes

Allowed values: code

client_idquerystringYes
response_modequerystringYes

Allowed values: direct

redirect_uriquerystringYes
scopequerystring
statequerystring

Responses

CodeDescriptionSchema
200

Ok

AuthResponse
400

Bad Request

Error
500

Server Error

Error

POST /authn​

POST /authn

This API provides the capability to perform user authentication.

Request body (required): application/json

Authentication request body.

Schema: AuthRequest

2 properties
NameTypeRequiredDescription
flowIdstringYes

A unique identifier for the authentication flow. The value of the flowId will remain the same for the entire authentication flow.

selectedAuthenticatorSelectedAuthenticatorYes

Contains the data related to a selected authenticator.

Responses

CodeDescriptionSchema
200

Ok

one of: AuthResponse, SuccessResponse
400

Bad Request

Error
500

Server Error

Error

Schemas​

AuthRequest​

Type: object

Authentication request body.

2 properties
NameTypeRequiredDescription
flowIdstringYes

A unique identifier for the authentication flow. The value of the flowId will remain the same for the entire authentication flow.

selectedAuthenticatorSelectedAuthenticatorYes

Contains the data related to a selected authenticator.

SelectedAuthenticator​

Type: object

Contains the data related to a selected authenticator.

2 properties
NameTypeRequiredDescription
authenticatorIdstringYes

The unique identifier of the selected authenticator.

paramsobject

The parameters required for the authenticator to perform user authentication.

AuthResponse​

Type: object

Authentication response body.

5 properties
NameTypeRequiredDescription
flowIdstringYes

A unique identifier for the authentication flow. The value of the flowId will remain the same for the entire authentication flow.

flowStatusstringYes

The status of the authentication flow.

  • INCOMPLETE - The authentication flow is incomplete and requires further steps.
  • FAIL_INCOMPLETE - The authentication flow has failed and requires further steps.

Allowed values: INCOMPLETE, FAIL_INCOMPLETE

flowTypestringYes

The type of the authentication flow. This version only contains flowType AUTHENTICATION.

Allowed values: AUTHENTICATION

nextStepNextStepYes

Contains the authenticator data related to the next step.

linksarray of LinkYes

Contains the urls related to the authentication flow.

NextStep​

Type: object

Contains the authenticator data related to the next step.

4 properties
NameTypeRequiredDescription
stepTypestringYes

The type of the next step in the authentication flow.

  • MULTI_OPTIONS_PROMPT - The next step is for authenticator selection.
  • AUTHENTICATOR_PROMPT - The next step is for authenticating the user through a configured authenticator.

Allowed values: MULTI_OPTIONS_PROMPT, AUTHENTICATOR_PROMPT

authenticatorsarray of AuthenticatorYes

Contains the data related to the available authentication steps.

acceptErrorParamsboolean

Denote that the server is capable of handling errors on behalf of the application. When this is set to true and when the application is handling part of the authentication process (ex: handling federation) when there are errors, the application can send the params in the error response to the server to handle it appropriately.

messagesarray of Message

Contains any messages related to the authentication step.

Authenticator​

Type: object

Contains the data related to an authenticator.

5 properties
NameTypeRequiredDescription
authenticatorIdstringYes

The authenticator identifier. Note that this identifier is mutable and can change over time. Therefore do not base any logic on this value.

authenticatorstringYes

The authenticator identifier.

idpstringYes

The identity provider identifier.

metadataAuthenticatorMetadataYes

Contains the metadata related to an authenticator.

requiredParamsarray of string

Contains the required parameters that should be sent to the server for processing the current step of the authentication request.

AuthenticatorMetadata​

Type: object

Contains the metadata related to an authenticator.

4 properties
NameTypeRequiredDescription
i18nKeystringYes

The i18n key for the authenticator. This can be used to get the localized text for the authenticator.

promptTypestring

The type of the prompt. The prompt can be one of the following.

  • USER_PROMPT - The prompt is for the user to input the required parameters for the authenticator.
  • INTERNAL_PROMPT - The prompt is for the system to perform an internal action which will result in obtaining the required parameters. ex: prompt for fido authentication, prompt for native federated authentication.
  • REDIRECTION_PROMPT - The prompt is for the user to be redirected to a different url which will result in obtaining the required parameters. ex: Authenticate using a federated authenticator which requires the user to be redirect to the federation identity provider. In this case a redirectUrl will be available in additionalData.

Allowed values: USER_PROMPT, INTERNAL_PROMPT, REDIRECTION_PROMPT

paramsarray of Param

Contains the data related to input parameters of the authenticator. Only present if the promptType is USER_PROMPT.

additionalDataobject

Contains any additional data related to the authenticator which would be needed for the application to perform authentication. ex: Fido2 challenge, redirectUrl for federated authentication.

Param​

Type: object

Contains the data related to an input parameter of the authenticator.

6 properties
NameTypeRequiredDescription
paramstringYes

The parameter identifier.

typestringYes

Indicates the data type of the parameter.

Allowed values: STRING, INTEGER, BOOLEAN

isConfidentialbooleanYes

Indicates whether the parameter is confidential or not.

orderintegerYes

Indicates the recommended display order of the parameter.

validationRegexstring

Contains the regex pattern to validate the parameter value.

i18nKeystringYes

The i18n key for the parameter. This can be used to get the localized text for the parameter.

Message​

Type: object

Contains the data related to a message for the authentication step.

5 properties
NameTypeRequiredDescription
typestringYes

Indicates the type of the message.

Allowed values: INFO, ERROR

messageIdstringYes

The message identifier.

messagestringYes

The message.

i18nKeystringYes

The i18n key for the message. This can be used to get the localized text for the message.

contextarray of Context

Contains any context information related to the message. The context information can be used to create localized messages. The available different context information is bound to the messageId. ex: failed attempt remaining count.

Context​

Type: object

A property map to contain any context information for messages.

2 properties
NameTypeRequiredDescription
keystringYes
valuestringYes

Type: object

Contains the data related to a link.

3 properties
NameTypeRequiredDescription
namestringYes

The identifier of the link.

hrefstringYes

The relative url of the link.

methodstringYes

The supported http methods of the link.

Allowed values: GET, POST

SuccessResponse​

Type: object

Response with authorization code received after a successful authentication.

2 properties
NameTypeRequiredDescription
flowStatusstring

The status of the authentication flow.

  • SUCCESS_COMPLETED - The authentication flow has been successfully completed.

Allowed values: SUCCESS_COMPLETED

authDataobject

Data related to the successful authentication. This will contain the authorization code which can be used to obtain the access token.

Error​

Type: object

Contains the data related to an error.

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstringYes
traceIdstringYes

Was this page helpful?