API contract to implement
The API contract for custom authentication action (version v1).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
BearerAuth: HTTP bearer
ApiKeyAuth: API key in header "X-API-Key"
OAuth2: oauth2
clientCredentials flow, token URL https://example.com/oauth/token
1 scopes
| Scope | Description |
|---|---|
process | process request generate response |
Other
handle authentication events
POST /
Request body (required): application/json
Schema: RequestBody
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | A unique correlation identifier, used to track the login flow throughout all requests and responses. |
requestId | string | A unique correlation identifier that associates with each request in the login flow received by WSO2 Identity Server. | |
actionType | string | Yes | Specifies the action being triggered, which in this case is AUTHENTICATION. Allowed values: |
event | Event | Yes | Contains authentication event details required for processing. |
allowedOperations | AllowedOperations | Yes | List of operations permitted based on the authentication event. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Ok | ResponseFor200StatusCode |
400 | Bad Request | ErrorResponse |
500 | Server Error | ErrorResponse |
Schemas
Event
Type: object
Contains authentication event details required for processing.
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
currentStepIndex | integer | Yes | Indicates the current authentication step executing that invokes the custom authenticator |
authenticatedSteps | array of AuthenticationStep | Defines the list of steps and the authenticator with which the user has already authenticated with, in each step. | |
tenant | Tenant | Yes | Information about the tenant initiating the authentication flow. |
application | Application | Yes | Metadata about the application triggering the authentication request. |
user | User | Details of the user engaged in the authentication process. | |
organization | Organization | Metadata of the organization the user is trying to log into. Organizations represent partners/enterprise customers in Business-to-Business (B2B) use cases. | |
userStore | UserStoreInEvent | Indicates the user store in which the user's identity or profile is being managed. |
Tenant
Type: object
Information about the tenant initiating the authentication flow.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | The unique numeric identifier of the tenant. | |
name | string | The domain name of the tenant. |
Application
Type: object
Metadata about the application triggering the authentication request.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | The unique numeric identifier of the application. | |
name | string | Name of the application |
User
Type: object
Details of the user engaged in the authentication process.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Defines the unique identifier of the user. | |
userIdentitySource | string | Denotes the source managing the user’s identity (LOCAL for internally managed user identities in userstores, FEDERATED for external identity providers). Allowed values: | |
sub | string | Subject identifier of the authenticating user. |
Organization
Type: object
Metadata of the organization the user is trying to log into. Organizations represent partners/enterprise customers in Business-to-Business (B2B) use cases.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Defines the unique identifier of the organization. | |
name | string | Defines the name of the organization. |
UserStoreInEvent
Type: object
Indicates the user store in which the user's identity or profile is being managed.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Defines the unique identifier of the user store. | |
name | string | Defines the name of the user store. |
RequestBody
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | A unique correlation identifier, used to track the login flow throughout all requests and responses. |
requestId | string | A unique correlation identifier that associates with each request in the login flow received by WSO2 Identity Server. | |
actionType | string | Yes | Specifies the action being triggered, which in this case is AUTHENTICATION. Allowed values: |
event | Event | Yes | Contains authentication event details required for processing. |
allowedOperations | AllowedOperations | Yes | List of operations permitted based on the authentication event. |
AuthenticationStep
Type: object
Details of an authentication step completed by the user.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
index | integer | step index | |
name | string | The name of the authenticator with which the user has authenticated in the defined step. |
AllowedOperations
Type: array of AllowedRedirectOperation
List of operations permitted based on the authentication event.
AllowedRedirectOperation
Type: object
Represents a redirection operation allowed during authentication.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Allowed values: |
SuccessResponseIdentificationAuthenticator
Type: object
Defines the SUCCESS status response expected from authenticators implementing 'External (Federated) User Authentication' or 'Internal User Authentication' type.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Allowed values: |
data | object | Yes | Authenticated user data. |
data.user | UserData |
SuccessResponseVerificationAuthenticator
Type: object
Defines the SUCCESS status response expected from authenticators implementing '2FA Authentication' type.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Allowed values: |
IncompleteResponse
Type: object
Defines the INCOMPLETE status response with redirection.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Allowed values: |
operations | array of RedirectOperation | Yes |
ErrorResponse
Type: object
Response format for error scenarios.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Indicates the outcome of the request. For an error operation, this should be set to ERROR. Allowed values: |
errorMessage | string | Yes | The cause of the error. |
errorDescription | string | Yes | A detailed description of the error. |
ResponseFor200StatusCode
Type: one of: SuccessResponseIdentificationAuthenticator, SuccessResponseVerificationAuthenticator, IncompleteResponse
Possible success responses for authentication requests.
UserData
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier of the user. If the authenticator is of 'Internal User Authentication' type there should be a user identity managed for this defined identifier in WSO2 Identity Server. |
claims | array of UserClaim | Claims of the authenticated user. | |
groups | array of string | Groups of the federated user. Applies if the authenticator is of 'External (Federated) User Authentication' type only. | |
userStore | UserStoreInUserData | Indicates the user store in which the user's identity or profile is being managed. Applies if the authenticator is of 'Internal User Authentication' type only. |
UserClaim
Type: object
User claims retrieved during authentication.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
uri | string (uri) | Yes | Claim uri defined in the 'http://wso2.org/claims' dialect |
value | object | Yes | Claim value. If the claim is multi-valued, it should be a list of strings (Note that the value configured for 'MultiAttributeSeparator' is not allowed in claim values). Otherwise, it should be a single string. |
UserStoreInUserData
Type: object
Indicates the user store in which the user's identity or profile is being managed. Applies if the authenticator is of 'Internal User Authentication' type only.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Defines the unique identifier of the user store. | |
name | string | Defines the name of the user store. |
RedirectOperation
Type: object
Defines the redirect operation.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
op | string | Defines the operation as 'redirect' Allowed values: | |
url | string (uri) | Defines the url that needs to be redirected to. |
Was this page helpful?