@@ -14,6 +14,7 @@ module.exports = (db, server, userHandler) => {
14
14
path : '/users/:user/2fa/webauthn/credentials' ,
15
15
tags : [ 'TwoFactorAuth' ] ,
16
16
summary : 'Get WebAuthN credentials for a user' ,
17
+ name : 'getWebAuthN' ,
17
18
description : 'This method returns the list of WebAuthN credentials for a given user' ,
18
19
validationObjs : {
19
20
requestBody : { } ,
@@ -43,7 +44,7 @@ module.exports = (db, server, userHandler) => {
43
44
)
44
45
. required ( )
45
46
. description ( 'List of credentials' )
46
- } )
47
+ } ) . $_setFlag ( 'objectName' , 'GetWebAuthNResponse' )
47
48
}
48
49
}
49
50
}
@@ -115,6 +116,7 @@ module.exports = (db, server, userHandler) => {
115
116
path : '/users/:user/2fa/webauthn/credentials/:credential' ,
116
117
tags : [ 'TwoFactorAuth' ] ,
117
118
summary : 'Remove WebAuthN authenticator' ,
119
+ name : 'deleteWebAuthN' ,
118
120
description : 'This method deletes the given WebAuthN authenticator for given user.' ,
119
121
validationObjs : {
120
122
requestBody : { } ,
@@ -132,7 +134,7 @@ module.exports = (db, server, userHandler) => {
132
134
model : Joi . object ( {
133
135
success : successRes ,
134
136
deleted : booleanSchema . required ( ) . description ( 'Specifies whether the given credential has been deleted' )
135
- } )
137
+ } ) . $_setFlag ( 'objectName' , 'DeleteWebAuthNResponse' )
136
138
}
137
139
}
138
140
}
@@ -187,6 +189,7 @@ module.exports = (db, server, userHandler) => {
187
189
path : '/users/:user/2fa/webauthn/registration-challenge' ,
188
190
tags : [ 'TwoFactorAuth' ] ,
189
191
summary : 'Get the WebAuthN registration challenge' ,
192
+ name : 'initiateWebAuthNRegistration' ,
190
193
description : 'This method initiates the WebAuthN authenticator registration challenge' ,
191
194
validationObjs : {
192
195
requestBody : {
@@ -247,7 +250,7 @@ module.exports = (db, server, userHandler) => {
247
250
)
248
251
. description ( 'List of credentials to exclude' )
249
252
} )
250
- } )
253
+ } ) . $_setFlag ( 'objectName' , 'InitiateWebAuthNRegistrationResponse' )
251
254
}
252
255
}
253
256
}
@@ -299,6 +302,7 @@ module.exports = (db, server, userHandler) => {
299
302
path : '/users/:user/2fa/webauthn/registration-attestation' ,
300
303
tags : [ 'TwoFactorAuth' ] ,
301
304
summary : 'Attestate WebAuthN authenticator' ,
305
+ name : 'attestateWebAuthNRegistration' ,
302
306
description : 'Attestation is used to verify the authenticity of the authenticator and provide assurances about its features.' ,
303
307
validationObjs : {
304
308
requestBody : {
@@ -333,7 +337,7 @@ module.exports = (db, server, userHandler) => {
333
337
rawId : Joi . string ( ) . hex ( ) . required ( ) . description ( 'Credential RawID as a hex string' ) ,
334
338
description : Joi . string ( ) . required ( ) . description ( 'Description for the authenticator' ) ,
335
339
authenticatorAttachment : Joi . string ( ) . required ( ) . description ( 'Specifies whether authenticator is "platform" or "cross-platform"' )
336
- } )
340
+ } ) . $_setFlag ( 'objectName' , 'AttestateWebAuthNRegistrationResponse' )
337
341
}
338
342
}
339
343
}
@@ -387,6 +391,7 @@ module.exports = (db, server, userHandler) => {
387
391
path : '/users/:user/2fa/webauthn/authentication-challenge' ,
388
392
tags : [ 'TwoFactorAuth' ] ,
389
393
summary : 'Begin WebAuthN authentication challenge' ,
394
+ name : 'authenticateWebAuthN' ,
390
395
description : 'This method retrieves the WebAuthN PublicKeyCredentialRequestOptions object to use it for authentication' ,
391
396
validationObjs : {
392
397
requestBody : {
@@ -431,7 +436,7 @@ module.exports = (db, server, userHandler) => {
431
436
} )
432
437
. required ( )
433
438
. description ( 'PublicKeyCredentialRequestOptions object' )
434
- } )
439
+ } ) . $_setFlag ( 'objectName' , 'AuthenticateWebAuthNResponse' )
435
440
}
436
441
}
437
442
}
@@ -483,6 +488,7 @@ module.exports = (db, server, userHandler) => {
483
488
path : '/users/:user/2fa/webauthn/authentication-assertion' ,
484
489
tags : [ 'TwoFactorAuth' ] ,
485
490
summary : 'WebAuthN authentication Assertion' ,
491
+ name : 'assertWebAuthN' ,
486
492
description : 'Assert WebAuthN authentication request and actually authenticate the user' ,
487
493
validationObjs : {
488
494
requestBody : {
@@ -529,7 +535,7 @@ module.exports = (db, server, userHandler) => {
529
535
. required ( )
530
536
. description ( 'Auth data' ) ,
531
537
token : Joi . string ( ) . description ( 'User auth token' )
532
- } )
538
+ } ) . $_setFlag ( 'objectName' , 'AssertWebAuthNResponse' )
533
539
}
534
540
}
535
541
}
0 commit comments