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

API v2.0 contract to implement

Download OpenAPI (YAML)Version v2.0

Base URL: <BASE_URL>

The API contract for pre update password action (version v2.0).

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 pre-update password events​

POST /

Request body (required): application/json

Schema: RequestBody

4 properties
NameTypeRequiredDescription
flowIdstring

A unique identifier that associates with the password updating flow in WSO2 Identity Server

requestIdstring

A unique correlation identifier that associates with the password update request received by WSO2 Identity Server

actionTypestringYes

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

Allowed values: PRE_UPDATE_PASSWORD

eventEventYes

Defines the context data related to the pre password update token event that needs to be shared with the custom service to process and execute.

Responses

CodeDescriptionSchema
200

Ok

one of: SuccessResponse, FailedResponse
400

Bad Request

ErrorResponse
500

Server Error

ErrorResponse

Schemas​

Event​

Type: object

Defines the context data related to the pre password update token event that needs to be shared with the custom service to process and execute.

6 properties
NameTypeRequiredDescription
initiatorTypestringYes

This indicates whether the password update was initiated by an admin, a user, or an application. The value must be either USER, ADMIN, or APPLICATION.

actionstringYes

This indicates whether the password update was initiated over a password reset flow, update flow, or an invite flow. The value must be either RESET, UPDATE, INVITE, or REGISTER.

tenantTenantYes

This property represents the tenant under which the token request is being processed.

organizationOrganization

This property represents the organization context.

userUserYes

Contains information about the user associated with the password update request.

userStoreUserStoreYes

Indicates the user store in which the user's data is being managed.

Tenant​

Type: object

This property represents the tenant under which the token request is being processed.

2 properties
NameTypeRequiredDescription
idstringYes

The unique numeric identifier of the tenant.

namestringYes

The domain name of the tenant.

Organization​

Type: object

This property represents the organization context.

4 properties
NameTypeRequiredDescription
idstringYes
namestringYes
orgHandlestringYes
depthintegerYes

User​

Type: object

Contains information about the user associated with the password update request.

5 properties
NameTypeRequiredDescription
idstring

Defines the unique identifier of the user.

claimsarray of any of: SingleValuedClaim, MultiValuedClaim

Additional user claims configured in the pre update profile action to be shared with the external service at a profile update event.

groupsarray of string

Groups of the user

organizationOrganization

This property represents the organization context.

updatingCredentialone of: UnencryptedCredential, EncryptedCredentialYes

UnencryptedCredential​

Type: object

4 properties
NameTypeRequiredDescription
typestringYes

Defines the credential type.

Allowed values: PASSWORD

formatstringYes

Defines the format the credential is shared. The value must be either PLAIN_TEXT, or HASH.

valuestringYes

Defines the value.

additionalDataAdditionalData

Defines the additional data related to the updating credential.

EncryptedCredential​

Type: string

Represents an encrypted credential using JSON Web Encryption (JWE).

When a public key is configured for the pre-password update action, the updatingCredential object is encrypted into a JWE string. The payload of this JWE follows the structure of the UnencryptedCredential object.

Example JWE representation:

eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkEyNTZHQ00ifQ.OKOawDo13gRp2ojaHV7LFsQ.48V1_ALb6US04U3b.5eym8X3LNvUubV4Y0kH.XFBoMYUZodetZdvTiFvSkQ

Decrypted Payload Example (UnencryptedCredential structure):

{
"type": "PASSWORD",
"format": "HASH",
"value": "cHRSHCjvmT",
"additionalData": {
"algorithm": "SHA256"
}
}

This ensures secure transmission of the credential while allowing validation upon decryption.

SingleValuedClaim​

Type: object

Defines the user claims that are configured to be shared with the external service during profile update flow.

2 properties
NameTypeRequiredDescription
uristringYes

Identifier of the user claim being shared. Claim uri is defined in the 'http://wso2.org/claims' dialect.

valuestringYes

Value of the single valued user claim in current profile.

MultiValuedClaim​

Type: object

Defines the user claims that are configured to be shared with the external service during profile update flow.

2 properties
NameTypeRequiredDescription
uristringYes

Identifier of the user claim being shared. Claim uri is defined in the 'http://wso2.org/claims' dialect.

valuearray of stringYes

Values of the multi valued user claim in current profile.

UserStore​

Type: object

Indicates the user store in which the user's data is being managed.

2 properties
NameTypeRequiredDescription
idstringYes

The unique identifier for the user store.

namestringYes

User store name used to identify the user store in configuration settings, user interfaces, and administrative tasks.

AdditionalData​

Type: any of: AdditionalDataForHashedPassword

Defines the additional data related to the updating credential.

AdditionalDataForHashedPassword​

Type: object

Defines additional data related to hashed passwords.

1 property
NameTypeRequiredDescription
algorithmstring

Allowed values: SHA256

SuccessResponse​

Type: object

Defines the success response.

1 property
NameTypeRequiredDescription
actionStatusstringYes

Allowed values: SUCCESS

FailedResponse​

Type: object

3 properties
NameTypeRequiredDescription
actionStatusstringYes

Indicates the outcome of the request. For a failed operation, this should be set to FAILED.

Allowed values: FAILED

failureReasonstringYes

Provides the reason for failing password update.

failureDescriptionstringYes

Offers a detailed explanation of the failure

ErrorResponse​

Type: object

When the external service responds with an ERROR state, it can return an HTTP status code of 400, 401, or 500, indicating either a validation failure or an issue processing the request.

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.

RequestBody​

Type: object

4 properties
NameTypeRequiredDescription
flowIdstring

A unique identifier that associates with the password updating flow in WSO2 Identity Server

requestIdstring

A unique correlation identifier that associates with the password update request received by WSO2 Identity Server

actionTypestringYes

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

Allowed values: PRE_UPDATE_PASSWORD

eventEventYes

Defines the context data related to the pre password update token event that needs to be shared with the custom service to process and execute.

Was this page helpful?