Skip to content

Commit 6001f64

Browse files
authored
Merge pull request #5801 from NipuniBhagya/master
[7.2.0] Introduce end-user credential management API documentation
2 parents 4de5d4e + b66bef0 commit 6001f64

File tree

5 files changed

+412
-0
lines changed

5 files changed

+412
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
template: templates/redoc.html
3+
---
4+
5+
<redoc spec-url="../../apis/restapis/end-user-credential-management.yaml" theme='{{redoc_theme}}'></redoc>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
template: templates/redoc.html
3+
---
4+
5+
<redoc spec-url="../../../apis/organization-apis/restapis/end-user-credential-management.yaml" theme='{{redoc_theme}}'></redoc>
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
openapi: 3.0.0
2+
info:
3+
description: |
4+
The Credential Management REST API provides a comprehensive interface to list and delete
5+
credentials enrolled by end-users within the WSO2 Identity Server. The administrators who are assigned with privileges to list and delete
6+
users (with scopes internal_user_mgt_view and internal_user_mgt_delete) are able to perform these operations.
7+
8+
<b>Note</b>: This API is available only in WSO2 Identity Server 7.2.0, beginning with update level 5
9+
(Updates 2.0 model). To update your server, see the instructions on
10+
<a hreaf="https://updates.docs.wso2.com/en/latest/updates/overview/" target="_blank">updating WSO2 products</a>
11+
12+
version: '1.0'
13+
title: WSO2 Identity Server - User Credential Management Rest API
14+
15+
security:
16+
- OAuth2: []
17+
- BasicAuth: []
18+
19+
servers:
20+
- url: https://{server-url}/t/{tenant-domain}/api/server/v1
21+
variables:
22+
tenant-domain:
23+
default: carbon.super
24+
server-url:
25+
default: localhost:9443
26+
27+
paths:
28+
/users/{user-id}/credentials:
29+
get:
30+
summary: List end-user enrolled credentials
31+
description: "Retrieves a list of all user-enrolled credentials. This API currently supports passkey and push
32+
authentication credentials. \n\n <b>Scope (Permission) required:</b> ``internal_user_mgt_view``\n\n"
33+
operationId: getUserCredentialsById
34+
tags:
35+
- List User Credentials
36+
parameters:
37+
- name: user-id
38+
in: path
39+
description: The unique identifier of the user.
40+
required: true
41+
schema:
42+
type: string
43+
responses:
44+
'200':
45+
description: OK
46+
content:
47+
application/json:
48+
schema:
49+
type: array
50+
items:
51+
$ref: '#/components/schemas/Credential'
52+
examples:
53+
response:
54+
value:
55+
[
56+
{
57+
"credentialId": "TJwhlvGKrEk7xSSKLrhoCsaA",
58+
"displayName": "My Security Key",
59+
"type": "PASSKEY"
60+
},
61+
{
62+
"credentialId": "996a12a0-b9aab-48ab-8016-d0ffd99ebe1b",
63+
"displayName": "My phone",
64+
"type": "PUSH_AUTH"
65+
}
66+
]
67+
'400':
68+
description: Bad Request.
69+
content:
70+
application/json:
71+
schema:
72+
$ref: '#/components/schemas/Error'
73+
'401':
74+
description: Unauthorized.
75+
content:
76+
application/json:
77+
schema:
78+
$ref: '#/components/schemas/Error'
79+
'403':
80+
description: Forbidden.
81+
content:
82+
application/json:
83+
schema:
84+
$ref: '#/components/schemas/Error'
85+
'404':
86+
description: User Not Found.
87+
content:
88+
application/json:
89+
schema:
90+
$ref: '#/components/schemas/Error'
91+
'500':
92+
description: Internal Server Error.
93+
content:
94+
application/json:
95+
schema:
96+
$ref: '#/components/schemas/Error'
97+
98+
/users/{user-id}/credentials/{type}/{credential-id}:
99+
delete:
100+
summary: Delete a user-enrolled credential.
101+
description: Deletes a specific enrolled credential for a user. Requires administrative privileges with scope internal_user_mgt_delete.
102+
operationId: deleteUserCredentialById
103+
tags:
104+
- Delete User Credential
105+
parameters:
106+
- name: user-id
107+
in: path
108+
description: The unique identifier of the user.
109+
required: true
110+
schema:
111+
type: string
112+
- name: type
113+
in: path
114+
description: The type of the credential.
115+
required: true
116+
schema:
117+
type: string
118+
enum: [passkey, push-auth]
119+
- name: credential-id
120+
in: path
121+
description: The unique identifier of the device to be deleted.
122+
required: true
123+
schema:
124+
type: string
125+
responses:
126+
'204':
127+
description: User Credential Deleted.
128+
'400':
129+
description: Bad Request.
130+
content:
131+
application/json:
132+
schema:
133+
$ref: '#/components/schemas/Error'
134+
'401':
135+
description: Unauthorized.
136+
content:
137+
application/json:
138+
schema:
139+
$ref: '#/components/schemas/Error'
140+
'403':
141+
description: Forbidden.
142+
content:
143+
application/json:
144+
schema:
145+
$ref: '#/components/schemas/Error'
146+
'500':
147+
description: Internal Server Error.
148+
content:
149+
application/json:
150+
schema:
151+
$ref: '#/components/schemas/Error'
152+
components:
153+
securitySchemes:
154+
BasicAuth:
155+
type: http
156+
scheme: basic
157+
OAuth2:
158+
type: oauth2
159+
flows:
160+
authorizationCode:
161+
authorizationUrl: 'https://localhost:9443/oauth2/authorize'
162+
tokenUrl: 'https://localhost:9443/oauth2/token'
163+
scopes:
164+
read: internal_user_mgt_view
165+
delete: internal_user_mgt_delete
166+
schemas:
167+
Credential:
168+
type: object
169+
properties:
170+
credentialId:
171+
type: string
172+
description: The unique identifier for the credential.
173+
example: 'a5a81c76-27a3-42d4-82a8-55285d82a4a1'
174+
displayName:
175+
type: string
176+
description: A user-friendly name for the credential.
177+
example: "YubiKey 5C"
178+
type:
179+
type: string
180+
description: The type of the credential.
181+
enum: [passkey, push-auth]
182+
Error:
183+
type: object
184+
properties:
185+
code:
186+
type: string
187+
description: Some error description.
188+
example: 'CM-00001'
189+
message:
190+
type: string
191+
description: Some error message.
192+
example: 'Some error message.'
193+
description:
194+
type: string
195+
description: A more detailed explanation of the error.
196+
example: 'Some error description.'
197+
traceId:
198+
type: string
199+
description: The unique identifier for the request.
200+
example: '8a5f5d4e-1d2c-4f3b-9c6e-7d8f9a0b1c2d'

0 commit comments

Comments
 (0)