API v2.0 contract to implement
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
| Scope | Description |
|---|---|
process | process request generate response |
Other
handle pre-update password events
POST /
Request body (required): application/json
Schema: RequestBody
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | A unique identifier that associates with the password updating flow in WSO2 Identity Server | |
requestId | string | A unique correlation identifier that associates with the password update request received by WSO2 Identity Server | |
actionType | string | Yes | Specifies the action being triggered, which in this case is PRE_UPDATE_PASSWORD. Allowed values: |
event | Event | Yes | 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
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
initiatorType | string | Yes | 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. |
action | string | Yes | 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. |
tenant | Tenant | Yes | This property represents the tenant under which the token request is being processed. |
organization | Organization | This property represents the organization context. | |
user | User | Yes | Contains information about the user associated with the password update request. |
userStore | UserStore | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique numeric identifier of the tenant. |
name | string | Yes | The domain name of the tenant. |
Organization
Type: object
This property represents the organization context.
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
orgHandle | string | Yes | |
depth | integer | Yes |
User
Type: object
Contains information about the user associated with the password update request.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Defines the unique identifier of the user. | |
claims | array 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. | |
groups | array of string | Groups of the user | |
organization | Organization | This property represents the organization context. | |
updatingCredential | one of: UnencryptedCredential, EncryptedCredential | Yes |
UnencryptedCredential
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Defines the credential type. Allowed values: |
format | string | Yes | Defines the format the credential is shared. The value must be either PLAIN_TEXT, or HASH. |
value | string | Yes | Defines the value. |
additionalData | AdditionalData | 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
| Name | Type | Required | Description |
|---|---|---|---|
uri | string | Yes | Identifier of the user claim being shared. Claim uri is defined in the 'http://wso2.org/claims' dialect. |
value | string | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
uri | string | Yes | Identifier of the user claim being shared. Claim uri is defined in the 'http://wso2.org/claims' dialect. |
value | array of string | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier for the user store. |
name | string | Yes | 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
| Name | Type | Required | Description |
|---|---|---|---|
algorithm | string | Allowed values: |
SuccessResponse
Type: object
Defines the success response.
1 property
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Allowed values: |
FailedResponse
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
actionStatus | string | Yes | Indicates the outcome of the request. For a failed operation, this should be set to FAILED. Allowed values: |
failureReason | string | Yes | Provides the reason for failing password update. |
failureDescription | string | Yes | 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
| 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. |
RequestBody
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
flowId | string | A unique identifier that associates with the password updating flow in WSO2 Identity Server | |
requestId | string | A unique correlation identifier that associates with the password update request received by WSO2 Identity Server | |
actionType | string | Yes | Specifies the action being triggered, which in this case is PRE_UPDATE_PASSWORD. Allowed values: |
event | Event | Yes | 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?