API contract to implement
The API contract for pre update password 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 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 issue access 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 issue access token event that needs to be shared with the custom service to process and execute.
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
initiatorType | string | Yes | This indicates whether the password update was initiated by an admin, a user, or an application. Allowed values: |
action | string | Yes | This indicates whether the password update was initiated over a password reset flow, update flow, or an invite flow. Allowed values: |
tenant | Tenant | Yes | This property represents the tenant under which the token request is being processed. |
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. |
User
Type: object
Contains information about the user associated with the password update request.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Defines the unique identifier of the user. |
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. Allowed values: |
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.
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 issue access token event that needs to be shared with the custom service to process and execute. |
Was this page helpful?