A AuthMS API Wiki API Reference iam.tianv.com →

POST /auth/webauthn/login/begin

生成登录挑战,返回给前端调用 navigator.credentials.get()

WebAuthn `bearerAuth` application/json

Request Body

Schema: handler.beginLoginRequest

FieldTypeRequiredExampleConstraintsDescription
password string Yes length: 1–?

Responses

StatusDescriptionSchema
200登录选项dto.WebAuthnLoginResponseWrapper
401未授权dto.SimpleResponseWrapper
500服务器错误dto.SimpleResponseWrapper

Referenced Schemas

dto.SimpleResponseWrapper

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No

dto.WebAuthnCredentialDescriptor

FieldTypeRequiredExampleConstraintsDescription
id string No
transports array of

string

No
type string No

dto.WebAuthnLoginOptionsResponse

FieldTypeRequiredExampleConstraintsDescription
allowCredentials array of

See dto.WebAuthnCredentialDescriptor

No
challenge string No
rpId string No
timeout integer No
userVerification string No

dto.WebAuthnLoginResponse

FieldTypeRequiredExampleConstraintsDescription
publicKey dto.WebAuthnLoginOptionsResponse No

dto.WebAuthnLoginResponseWrapper

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.WebAuthnLoginResponse No
message string No
timestamp string No