POST /auth/webauthn/login/begin
生成登录挑战,返回给前端调用 navigator.credentials.get()
WebAuthn `bearerAuth` application/json
Request Body
Schema: handler.beginLoginRequest
| Field | Type | Required | Example | Constraints | Description |
password |
string |
Yes |
|
length: 1–? |
|
Referenced Schemas
dto.SimpleResponseWrapper
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
dto.WebAuthnCredentialDescriptor
| Field | Type | Required | Example | Constraints | Description |
id |
string |
No |
|
|
|
transports |
array of
string |
No |
|
|
|
type |
string |
No |
|
|
|
dto.WebAuthnLoginOptionsResponse
| Field | Type | Required | Example | Constraints | Description |
allowCredentials |
array of
See dto.WebAuthnCredentialDescriptor |
No |
|
|
|
challenge |
string |
No |
|
|
|
rpId |
string |
No |
|
|
|
timeout |
integer |
No |
|
|
|
userVerification |
string |
No |
|
|
|
dto.WebAuthnLoginResponse
dto.WebAuthnLoginResponseWrapper
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.WebAuthnLoginResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|