Skip to content

Commit c5f4a90

Browse files
Add webauthn related type fixes for paths
1 parent 65f075d commit c5f4a90

File tree

1 file changed

+200
-7
lines changed

1 file changed

+200
-7
lines changed

api_spec.yaml

Lines changed: 200 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ paths:
24122412
expectedValue: val
24132413
actualValue: claimVal
24142414

2415-
/{apiBasePath}/<tenantId>/webauthn/register/options:
2415+
/{apiBasePath}/<tenantId>/webauthn/options/register:
24162416
post:
24172417
tags:
24182418
- WebAuthn Recipe
@@ -2451,6 +2451,18 @@ paths:
24512451
schema:
24522452
oneOf:
24532453
- type: object
2454+
required:
2455+
- webauthnGeneratedOptionsId
2456+
- createdAt
2457+
- expiresAt
2458+
- rp
2459+
- user
2460+
- challenge
2461+
- timeout
2462+
- excludeCredentials
2463+
- attestation
2464+
- pubKeyCredParams
2465+
- authenticatorSelection
24542466
properties:
24552467
status:
24562468
$ref: '#/components/schemas/statusOK'
@@ -2465,6 +2477,9 @@ paths:
24652477
example: "2024-03-20T10:05:00Z"
24662478
rp:
24672479
type: object
2480+
required:
2481+
- id
2482+
- name
24682483
properties:
24692484
id:
24702485
type: string
@@ -2474,6 +2489,10 @@ paths:
24742489
example: "Example Site"
24752490
user:
24762491
type: object
2492+
required:
2493+
- id
2494+
- name
2495+
- displayName
24772496
properties:
24782497
id:
24792498
type: string
@@ -2494,6 +2513,10 @@ paths:
24942513
type: array
24952514
items:
24962515
type: object
2516+
required:
2517+
- id
2518+
- type
2519+
- transports
24972520
properties:
24982521
id:
24992522
type: string
@@ -2512,15 +2535,22 @@ paths:
25122535
type: array
25132536
items:
25142537
type: object
2538+
required:
2539+
- alg
2540+
- type
25152541
properties:
25162542
alg:
25172543
type: number
25182544
example: -7
25192545
type:
25202546
type: string
2521-
example: "public-key"
2547+
enum: ["public-key"]
25222548
authenticatorSelection:
25232549
type: object
2550+
required:
2551+
- requireResidentKey
2552+
- residentKey
2553+
- userVerification
25242554
properties:
25252555
requireResidentKey:
25262556
type: boolean
@@ -2549,7 +2579,7 @@ paths:
25492579
'500':
25502580
$ref: '#/components/responses/500'
25512581

2552-
/{apiBasePath}/<tenantId>/webauthn/signin/options:
2582+
/{apiBasePath}/<tenantId>/webauthn/options/signin:
25532583
post:
25542584
tags:
25552585
- WebAuthn Recipe
@@ -2957,6 +2987,154 @@ paths:
29572987
$ref: '#/components/responses/404'
29582988
'500':
29592989
$ref: '#/components/responses/500'
2990+
/{apiBasePath}/<tenantId>/user/webauthn/reset/token:
2991+
post:
2992+
tags:
2993+
- WebAuthn Recipe
2994+
operationId: webauthnResetToken
2995+
description: |
2996+
Reset a WebAuthn account
2997+
parameters:
2998+
- $ref: '#/components/parameters/apiBasePath'
2999+
- $ref: '#/components/parameters/webauthnRid'
3000+
requestBody:
3001+
required: true
3002+
content:
3003+
application/json:
3004+
schema:
3005+
type: object
3006+
required:
3007+
- email
3008+
properties:
3009+
email:
3010+
type: string
3011+
responses:
3012+
'200':
3013+
description: Reset token response
3014+
content:
3015+
application/json:
3016+
schema:
3017+
oneOf:
3018+
- type: object
3019+
required:
3020+
- status
3021+
properties:
3022+
status:
3023+
type: string
3024+
enum: [OK]
3025+
3026+
- type: object
3027+
required:
3028+
- status
3029+
- message
3030+
properties:
3031+
status:
3032+
type: string
3033+
enum: [GENERAL_ERROR]
3034+
message:
3035+
type: string
3036+
3037+
- type: object
3038+
required:
3039+
- status
3040+
- reason
3041+
properties:
3042+
status:
3043+
type: string
3044+
enum: [RECOVER_ACCOUNT_NOT_ALLOWED]
3045+
reason:
3046+
type: string
3047+
'404':
3048+
$ref: '#/components/responses/404'
3049+
'500':
3050+
$ref: '#/components/responses/500'
3051+
3052+
/{apiBasePath}/<tenantId>/user/webauthn/reset:
3053+
post:
3054+
tags:
3055+
- WebAuthn Recipe
3056+
operationId: webauthnReset
3057+
description: |
3058+
Reset a WebAuthn account
3059+
parameters:
3060+
- $ref: '#/components/parameters/apiBasePath'
3061+
- $ref: '#/components/parameters/webauthnRid'
3062+
requestBody:
3063+
required: true
3064+
content:
3065+
application/json:
3066+
schema:
3067+
type: object
3068+
required:
3069+
- token
3070+
- webauthnGeneratedOptionsId
3071+
- credential
3072+
properties:
3073+
token:
3074+
type: string
3075+
webauthnGeneratedOptionsId:
3076+
type: string
3077+
credential:
3078+
$ref: '#/components/schemas/registrationPayload'
3079+
responses:
3080+
'200':
3081+
description: WebAuthn account reset response
3082+
content:
3083+
application/json:
3084+
schema:
3085+
oneOf:
3086+
- type: object
3087+
required:
3088+
- status
3089+
- user
3090+
- email
3091+
properties:
3092+
status:
3093+
type: string
3094+
enum: [OK]
3095+
user:
3096+
$ref: '#/components/schemas/user'
3097+
email:
3098+
type: string
3099+
3100+
- type: object
3101+
required:
3102+
- status
3103+
- message
3104+
properties:
3105+
status:
3106+
type: string
3107+
enum: [GENERAL_ERROR]
3108+
message:
3109+
type: string
3110+
3111+
- type: object
3112+
required:
3113+
- status
3114+
properties:
3115+
status:
3116+
type: string
3117+
enum:
3118+
- RECOVER_ACCOUNT_TOKEN_INVALID_ERROR
3119+
- INVALID_CREDENTIALS_ERROR
3120+
- OPTIONS_NOT_FOUND_ERROR
3121+
- INVALID_OPTIONS_ERROR
3122+
3123+
- type: object
3124+
required:
3125+
- status
3126+
- reason
3127+
properties:
3128+
status:
3129+
type: string
3130+
enum: [INVALID_AUTHENTICATOR_ERROR]
3131+
reason:
3132+
type: string
3133+
3134+
'404':
3135+
$ref: '#/components/responses/404'
3136+
'500':
3137+
$ref: '#/components/responses/500'
29603138

29613139
components:
29623140
parameters:
@@ -3490,6 +3668,22 @@ components:
34903668
type: string
34913669
enum:
34923670
- Not Found
3671+
3672+
clientExtensionResults:
3673+
type: object
3674+
properties:
3675+
appid:
3676+
type: boolean
3677+
example: true
3678+
credProps:
3679+
type: object
3680+
properties:
3681+
rk:
3682+
type: boolean
3683+
example: true
3684+
hmacCreateSecret:
3685+
type: boolean
3686+
example: true
34933687

34943688
registrationPayload:
34953689
type: object
@@ -3509,8 +3703,8 @@ components:
35093703
type: string
35103704
enum: ["platform", "cross-platform"]
35113705
clientExtensionResults:
3512-
type: object
3513-
additionalProperties: true
3706+
$ref: '#/components/schemas/clientExtensionResults'
3707+
35143708
response:
35153709
type: object
35163710
required:
@@ -3559,8 +3753,7 @@ components:
35593753
type: string
35603754
enum: ["platform", "cross-platform"]
35613755
clientExtensionResults:
3562-
type: object
3563-
additionalProperties: true
3756+
$ref: '#/components/schemas/clientExtensionResults'
35643757
response:
35653758
type: object
35663759
required:

0 commit comments

Comments
 (0)