Skip to content

Commit 5b52b80

Browse files
committed
feat: add WebAuthn credential management endpoints for removal and listing
1 parent 18ec005 commit 5b52b80

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

api_spec.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2917,6 +2917,103 @@ paths:
29172917
'500':
29182918
$ref: '#/components/responses/500'
29192919

2920+
/{apiBasePath}/<tenantId>/webauthn/credential/remove:
2921+
post:
2922+
tags:
2923+
- WebAuthn Recipe
2924+
operationId: webauthnRemoveCredential
2925+
description: |
2926+
Remove a WebAuthn credential for an existing user
2927+
parameters:
2928+
- $ref: '#/components/parameters/apiBasePath'
2929+
- $ref: '#/components/parameters/webauthnRid'
2930+
- $ref: '#/components/parameters/anti-csrf'
2931+
security:
2932+
- AccessTokenBearer: []
2933+
- AccessTokenCookie: []
2934+
requestBody:
2935+
content:
2936+
application/json:
2937+
schema:
2938+
type: object
2939+
required:
2940+
- webauthnCredentialId
2941+
properties:
2942+
webauthnCredentialId:
2943+
type: string
2944+
example: "cred_123..."
2945+
responses:
2946+
'200':
2947+
description: Credential removal response
2948+
content:
2949+
application/json:
2950+
schema:
2951+
oneOf:
2952+
- type: object
2953+
properties:
2954+
status:
2955+
$ref: '#/components/schemas/statusOK'
2956+
- $ref: '#/components/schemas/generalErrorResponse'
2957+
- type: object
2958+
properties:
2959+
status:
2960+
type: string
2961+
enum: ["CREDENTIAL_NOT_FOUND_ERROR"]
2962+
'404':
2963+
$ref: '#/components/responses/404'
2964+
'500':
2965+
$ref: '#/components/responses/500'
2966+
2967+
/{apiBasePath}/<tenantId>/webauthn/credential/list:
2968+
get:
2969+
tags:
2970+
- WebAuthn Recipe
2971+
operationId: webauthnListCredentials
2972+
description: |
2973+
List all WebAuthn credentials for an existing user
2974+
parameters:
2975+
- $ref: '#/components/parameters/apiBasePath'
2976+
- $ref: '#/components/parameters/webauthnRid'
2977+
- $ref: '#/components/parameters/anti-csrf'
2978+
security:
2979+
- AccessTokenBearer: []
2980+
- AccessTokenCookie: []
2981+
responses:
2982+
'200':
2983+
description: Credential list response
2984+
content:
2985+
application/json:
2986+
schema:
2987+
oneOf:
2988+
- type: object
2989+
properties:
2990+
status:
2991+
$ref: '#/components/schemas/statusOK'
2992+
credentials:
2993+
type: array
2994+
items:
2995+
type: object
2996+
properties:
2997+
webauthnCredentialId:
2998+
type: string
2999+
example: "cred_123..."
3000+
relyingPartyId:
3001+
type: string
3002+
example: "https://example.com"
3003+
createdAt:
3004+
type: number
3005+
example: 1638433545183
3006+
- $ref: '#/components/schemas/generalErrorResponse'
3007+
- type: object
3008+
properties:
3009+
status:
3010+
type: string
3011+
enum: ["CREDENTIAL_NOT_FOUND_ERROR"]
3012+
'404':
3013+
$ref: '#/components/responses/404'
3014+
'500':
3015+
$ref: '#/components/responses/500'
3016+
29203017
/{apiBasePath}/<tenantId>/webauthn/email/exists:
29213018
get:
29223019
tags:

0 commit comments

Comments
 (0)