You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: API contract for pre update password action
4
+
description: This API defines the REST API contract for a service that implements logic to extend password update flow of Asgardeo.
5
+
version: v1
6
+
security:
7
+
- BasicAuth: []
8
+
- BearerAuth: []
9
+
- ApiKeyAuth: []
10
+
- OAuth2: []
11
+
paths:
12
+
/:
13
+
post:
14
+
summary: handle pre-update password events
15
+
requestBody:
16
+
content:
17
+
application/json:
18
+
schema:
19
+
$ref: '#/components/schemas/RequestBody'
20
+
required: true
21
+
responses:
22
+
"200":
23
+
description: Ok
24
+
content:
25
+
application/json:
26
+
schema:
27
+
oneOf:
28
+
- $ref: '#/components/schemas/SuccessResponse'
29
+
- $ref: '#/components/schemas/FailedResponse'
30
+
examples:
31
+
successExample:
32
+
summary: Success response
33
+
value:
34
+
actionStatus: SUCCESS
35
+
failedExample:
36
+
summary: Failed response
37
+
value:
38
+
actionStatus: FAILED
39
+
failureReason: password_compromised
40
+
failureDescription: "The provided password is compromised."
41
+
"400":
42
+
description: Bad Request
43
+
content:
44
+
application/json:
45
+
schema:
46
+
$ref: '#/components/schemas/ErrorResponse'
47
+
example:
48
+
actionStatus: ERROR
49
+
error: invalid_credential
50
+
errorDescription: Expects the encrypted credential.
51
+
"500":
52
+
description: Server Error
53
+
content:
54
+
application/json:
55
+
schema:
56
+
$ref: '#/components/schemas/ErrorResponse'
57
+
example:
58
+
actionStatus: ERROR
59
+
error: server_error
60
+
errorDescription: Failed to process the response
61
+
components:
62
+
schemas:
63
+
Event:
64
+
type: object
65
+
properties:
66
+
initiatorType:
67
+
type: string
68
+
example: USER
69
+
enum:
70
+
- USER
71
+
- ADMIN
72
+
- APPLICATION
73
+
description: This indicates whether the password update was initiated by an admin, a user, or an application.
74
+
action:
75
+
type: string
76
+
example: RESET
77
+
enum:
78
+
- RESET
79
+
- UPDATE
80
+
- INVITE
81
+
description: This indicates whether the password update was initiated over a password reset flow, update flow, or an invite flow.
82
+
tenant:
83
+
$ref: '#/components/schemas/Tenant'
84
+
user:
85
+
$ref: '#/components/schemas/User'
86
+
organization:
87
+
$ref: '#/components/schemas/Organization'
88
+
userStore:
89
+
$ref: '#/components/schemas/UserStore'
90
+
description: 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.
91
+
Tenant:
92
+
type: object
93
+
properties:
94
+
id:
95
+
type: string
96
+
description: The unique numeric identifier of the tenant.
97
+
example: "2"
98
+
name:
99
+
type: string
100
+
description: The domain name of the tenant.
101
+
example: bar.com
102
+
description: This property represents the tenant under which the token request is being processed.
103
+
User:
104
+
type: object
105
+
properties:
106
+
id:
107
+
type: string
108
+
description: Defines the unique identifier of the user.
description: The unique identifier of the organization.
170
+
example: 5c7930f2-c97d-4b38-89a6-7be5fb138a35
171
+
name:
172
+
type: string
173
+
description: "Name of the organization used to identify the organization in configurations, user interfaces, etc."
174
+
example: foo.com
175
+
description: Refers to the organization to which the user belongs. Organizations represent partners/enterprise customers in Business-to-Business (B2B) use cases.
176
+
UserStore:
177
+
type: object
178
+
properties:
179
+
id:
180
+
type: string
181
+
description: The unique identifier for the user store.
182
+
example: UFJJTUFSWQ==
183
+
name:
184
+
type: string
185
+
description: "User store name used to identify the user store in configuration settings, user interfaces, and administrative tasks."
186
+
example: PRIMARY
187
+
description: Indicates the user store in which the user's data is being managed.
188
+
AdditionalData:
189
+
type: object
190
+
description: Defines the additional data related to the updating credential.
description: Defines additional data related to hashed passwords.
201
+
SuccessResponse:
202
+
type: object
203
+
properties:
204
+
actionStatus:
205
+
type: string
206
+
enum:
207
+
- SUCCESS
208
+
description: Defines the success response.
209
+
FailedResponse:
210
+
type: object
211
+
properties:
212
+
actionStatus:
213
+
type: string
214
+
enum:
215
+
- FAILED
216
+
description: Indicates the outcome of the request. For a failed operation, this should be set to FAILED.
217
+
failureReason:
218
+
type: string
219
+
description: Provides the reason for failing password update.
220
+
failureDescription:
221
+
type: string
222
+
description: Offers a detailed explanation of the failure
223
+
ErrorResponse:
224
+
type: object
225
+
properties:
226
+
actionStatus:
227
+
type: string
228
+
enum:
229
+
- ERROR
230
+
description: Indicates the outcome of the request. For an error operation, this should be set to ERROR.
231
+
errorMessage:
232
+
type: string
233
+
description: The cause of the error.
234
+
errorDescription:
235
+
type: string
236
+
description: A detailed description of the error.
237
+
description: |
238
+
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.
239
+
RequestBody:
240
+
type: object
241
+
properties:
242
+
actionType:
243
+
type: string
244
+
description: "Specifies the action being triggered, which in this case is PRE_UPDATE_PASSWORD."
0 commit comments