POST /auth/webauthn/register/begin
生成注册挑战和凭证创建选项,返回给前端调用 navigator.credentials.create()
WebAuthn `bearerAuth` application/json
Request Body
Schema: handler.beginRegistrationRequest
| Field | Type | Required | Example | Constraints | Description |
password |
string |
Yes |
|
length: 1–? |
|
user_name |
string |
Yes |
|
|
|
display_name |
string |
No |
|
|
|
Referenced Schemas
dto.SimpleResponseWrapper
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
dto.WebAuthnAuthenticatorSelection
| Field | Type | Required | Example | Constraints | Description |
authenticatorAttachment |
string |
No |
|
|
|
residentKey |
string |
No |
|
|
|
userVerification |
string |
No |
|
|
|
dto.WebAuthnCredentialParameter
| Field | Type | Required | Example | Constraints | Description |
alg |
integer |
No |
|
|
|
type |
string |
No |
|
|
|
dto.WebAuthnRPEntity
| Field | Type | Required | Example | Constraints | Description |
id |
string |
No |
|
|
|
name |
string |
No |
|
|
|
dto.WebAuthnRegistrationOptionsResponse
WebAuthn navigator.credentials.create() 的 publicKey 参数
dto.WebAuthnRegistrationResponse
dto.WebAuthnRegistrationResponseWrapper
dto.WebAuthnUserEntity
| Field | Type | Required | Example | Constraints | Description |
displayName |
string |
No |
|
|
|
id |
string |
No |
|
|
|
name |
string |
No |
|
|
|