|
|
|
@ -136,6 +136,13 @@ export class AuthController { |
|
|
|
return this.webAuthService.generateRegistrationOptions(); |
|
|
|
} |
|
|
|
|
|
|
|
@Post('webauthn/generate-authentication-options') |
|
|
|
public async generateAuthenticationOptions( |
|
|
|
@Body() body: { deviceId: string } |
|
|
|
) { |
|
|
|
return this.webAuthService.generateAuthenticationOptions(body.deviceId); |
|
|
|
} |
|
|
|
|
|
|
|
@Post('webauthn/verify-attestation') |
|
|
|
@UseGuards(AuthGuard('jwt'), HasPermissionGuard) |
|
|
|
public async verifyAttestation( |
|
|
|
@ -144,13 +151,6 @@ export class AuthController { |
|
|
|
return this.webAuthService.verifyAttestation(body.credential); |
|
|
|
} |
|
|
|
|
|
|
|
@Post('webauthn/generate-authentication-options') |
|
|
|
public async generateAuthenticationOptions( |
|
|
|
@Body() body: { deviceId: string } |
|
|
|
) { |
|
|
|
return this.webAuthService.generateAuthenticationOptions(body.deviceId); |
|
|
|
} |
|
|
|
|
|
|
|
@Post('webauthn/verify-authentication') |
|
|
|
public async verifyAuthentication( |
|
|
|
@Body() body: { deviceId: string; credential: AssertionCredentialJSON } |
|
|
|
|