App-native authentication API
The WSO2 Identity Server - 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
response_type | query | string | Yes | Allowed values: |
client_id | query | string | Yes | |
response_mode | query | string | Yes | Allowed values: |
redirect_uri | query | string | Yes | |
scope | query | string | ||
state | query | string |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | A unique identifier for the authentication flow. The value of the flowId will remain the same for the entire authentication flow. |
selectedAuthenticator | SelectedAuthenticator | Yes | Contains the data related to a selected authenticator. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Ok | one of: AuthResponse, SuccessResponse |
400 | Bad Request | Error |
500 | Server Error | Error |
Schemas
AuthRequest
Type: object
Authentication request body.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | A unique identifier for the authentication flow. The value of the flowId will remain the same for the entire authentication flow. |
selectedAuthenticator | SelectedAuthenticator | Yes | Contains the data related to a selected authenticator. |
SelectedAuthenticator
Type: object
Contains the data related to a selected authenticator.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
authenticatorId | string | Yes | The unique identifier of the selected authenticator. |
params | object | The parameters required for the authenticator to perform user authentication. |
AuthResponse
Type: object
Authentication response body.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | A unique identifier for the authentication flow. The value of the flowId will remain the same for the entire authentication flow. |
flowStatus | string | Yes | The status of the authentication flow.
Allowed values: |
flowType | string | Yes | The type of the authentication flow. This version only contains flowType AUTHENTICATION. Allowed values: |
nextStep | NextStep | Yes | Contains the authenticator data related to the next step. |
links | array of Link | Yes | Contains the urls related to the authentication flow. |
NextStep
Type: object
Contains the authenticator data related to the next step.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
stepType | string | Yes | The type of the next step in the authentication flow.
Allowed values: |
authenticators | array of Authenticator | Yes | Contains the data related to the available authentication steps. |
acceptErrorParams | boolean | Denote that the server is capable of handling errors on behalf of the application. When this is set to | |
messages | array of Message | Contains any messages related to the authentication step. |
Authenticator
Type: object
Contains the data related to an authenticator.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
authenticatorId | string | Yes | The authenticator identifier. Note that this identifier is mutable and can change over time. Therefore do not base any logic on this value. |
authenticator | string | Yes | The authenticator identifier. |
idp | string | Yes | The identity provider identifier. |
metadata | AuthenticatorMetadata | Yes | Contains the metadata related to an authenticator. |
requiredParams | array 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
| Name | Type | Required | Description |
|---|---|---|---|
i18nKey | string | Yes | The i18n key for the authenticator. This can be used to get the localized text for the authenticator. |
promptType | string | The type of the prompt. The prompt can be one of the following.
Allowed values: | |
params | array of Param | Contains the data related to input parameters of the authenticator. Only present if the | |
additionalData | object | 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
| Name | Type | Required | Description |
|---|---|---|---|
param | string | Yes | The parameter identifier. |
type | string | Yes | Indicates the data type of the parameter. Allowed values: |
isConfidential | boolean | Yes | Indicates whether the parameter is confidential or not. |
order | integer | Yes | Indicates the recommended display order of the parameter. |
validationRegex | string | Contains the regex pattern to validate the parameter value. | |
i18nKey | string | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Indicates the type of the message. Allowed values: |
messageId | string | Yes | The message identifier. |
message | string | Yes | The message. |
i18nKey | string | Yes | The i18n key for the message. This can be used to get the localized text for the message. |
context | array 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
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Yes | |
value | string | Yes |
Link
Type: object
Contains the data related to a link.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The identifier of the link. |
href | string | Yes | The relative url of the link. |
method | string | Yes | The supported http methods of the link. Allowed values: |
SuccessResponse
Type: object
Response with authorization code received after a successful authentication.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowStatus | string | The status of the authentication flow.
Allowed values: | |
authData | object | 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
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | Yes | |
traceId | string | Yes |
Was this page helpful?