Skip to main content
You're reading Identity & Access Management 7.1.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

API contract to implement

Download OpenAPI (YAML)Version v1

Base URL: <BASE_URL>

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
ScopeDescription
processprocess request generate response

Other​

handle authentication events​

POST /

Request body (required): application/json

Schema: RequestBody

5 properties
NameTypeRequiredDescription
flowIdstringYes

A unique correlation identifier, used to track the login flow throughout all requests and responses.

requestIdstring

A unique correlation identifier that associates with each request in the login flow received by WSO2 Identity Server.

actionTypestringYes

Specifies the action being triggered, which in this case is AUTHENTICATION.

Allowed values: AUTHENTICATION

eventEventYes

Contains authentication event details required for processing.

allowedOperationsAllowedOperationsYes

List of operations permitted based on the authentication event.

Responses

CodeDescriptionSchema
200

Ok

ResponseFor200StatusCode
400

Bad Request

ErrorResponse
500

Server Error

ErrorResponse

Schemas​

Event​

Type: object

Contains authentication event details required for processing.

7 properties
NameTypeRequiredDescription
currentStepIndexintegerYes

Indicates the current authentication step executing that invokes the custom authenticator

authenticatedStepsarray of AuthenticationStep

Defines the list of steps and the authenticator with which the user has already authenticated with, in each step.

tenantTenantYes

Information about the tenant initiating the authentication flow.

applicationApplicationYes

Metadata about the application triggering the authentication request.

userUser

Details of the user engaged in the authentication process.

organizationOrganization

Metadata of the organization the user is trying to log into. Organizations represent partners/enterprise customers in Business-to-Business (B2B) use cases.

userStoreUserStoreInEvent

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
NameTypeRequiredDescription
idstring

The unique numeric identifier of the tenant.

namestring

The domain name of the tenant.

Application​

Type: object

Metadata about the application triggering the authentication request.

2 properties
NameTypeRequiredDescription
idstring

The unique numeric identifier of the application.

namestring

Name of the application

User​

Type: object

Details of the user engaged in the authentication process.

3 properties
NameTypeRequiredDescription
idstring

Defines the unique identifier of the user.

userIdentitySourcestring

Denotes the source managing the user’s identity (LOCAL for internally managed user identities in userstores, FEDERATED for external identity providers).

Allowed values: LOCAL, FEDERATED

substring

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
NameTypeRequiredDescription
idstring

Defines the unique identifier of the organization.

namestring

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
NameTypeRequiredDescription
idstring

Defines the unique identifier of the user store.

namestring

Defines the name of the user store.

RequestBody​

Type: object

5 properties
NameTypeRequiredDescription
flowIdstringYes

A unique correlation identifier, used to track the login flow throughout all requests and responses.

requestIdstring

A unique correlation identifier that associates with each request in the login flow received by WSO2 Identity Server.

actionTypestringYes

Specifies the action being triggered, which in this case is AUTHENTICATION.

Allowed values: AUTHENTICATION

eventEventYes

Contains authentication event details required for processing.

allowedOperationsAllowedOperationsYes

List of operations permitted based on the authentication event.

AuthenticationStep​

Type: object

Details of an authentication step completed by the user.

2 properties
NameTypeRequiredDescription
indexinteger

step index

namestring

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
NameTypeRequiredDescription
opstring

Allowed values: redirect

SuccessResponseIdentificationAuthenticator​

Type: object

Defines the SUCCESS status response expected from authenticators implementing 'External (Federated) User Authentication' or 'Internal User Authentication' type.

3 properties
NameTypeRequiredDescription
actionStatusstringYes

Allowed values: SUCCESS

dataobjectYes

Authenticated user data.

data.userUserData

SuccessResponseVerificationAuthenticator​

Type: object

Defines the SUCCESS status response expected from authenticators implementing '2FA Authentication' type.

1 property
NameTypeRequiredDescription
actionStatusstringYes

Allowed values: SUCCESS

IncompleteResponse​

Type: object

Defines the INCOMPLETE status response with redirection.

2 properties
NameTypeRequiredDescription
actionStatusstringYes

Allowed values: INCOMPLETE

operationsarray of RedirectOperationYes

ErrorResponse​

Type: object

Response format for error scenarios.

3 properties
NameTypeRequiredDescription
actionStatusstringYes

Indicates the outcome of the request. For an error operation, this should be set to ERROR.

Allowed values: ERROR

errorMessagestringYes

The cause of the error.

errorDescriptionstringYes

A detailed description of the error.

ResponseFor200StatusCode​

Type: one of: SuccessResponseIdentificationAuthenticator, SuccessResponseVerificationAuthenticator, IncompleteResponse

Possible success responses for authentication requests.

UserData​

Type: object

4 properties
NameTypeRequiredDescription
idstringYes

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.

claimsarray of UserClaim

Claims of the authenticated user.

groupsarray of string

Groups of the federated user. Applies if the authenticator is of 'External (Federated) User Authentication' type only.

userStoreUserStoreInUserData

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
NameTypeRequiredDescription
uristring (uri)Yes

Claim uri defined in the 'http://wso2.org/claims' dialect

valueobjectYes

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
NameTypeRequiredDescription
idstring

Defines the unique identifier of the user store.

namestring

Defines the name of the user store.

RedirectOperation​

Type: object

Defines the redirect operation.

2 properties
NameTypeRequiredDescription
opstring

Defines the operation as 'redirect'

Allowed values: redirect

urlstring (uri)

Defines the url that needs to be redirected to.

Was this page helpful?