/auth/webauthn/authenticate/begin
根据邮箱查找用户,生成Passkey登录挑战(无需JWT)
请求体
Schema: service-identity/internal/handler/dto.PasskeyAuthBeginRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
email |
string |
否 | |||
mediation |
string |
否 | "conditional" 启用条件UI(免填写邮箱自动填充) | ||
tenant_id |
string |
否 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 200 | 登录选项 | service-identity/internal/handler/dto.WebAuthnLoginResponseWrapper |
| 400 | 请求参数错误 | service-core/base/dto.SimpleResponse |
| 404 | 用户不存在 | service-core/base/dto.SimpleResponse |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-identity/internal/handler/dto.WebAuthnCredentialDescriptor
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
id |
string |
否 | |||
transports |
array of string |
否 | |||
type |
string |
否 |
service-identity/internal/handler/dto.WebAuthnLoginOptionsResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
allowCredentials |
array of 参见 |
否 | |||
challenge |
string |
否 | |||
rpId |
string |
否 | |||
timeout |
integer |
否 | |||
userVerification |
string |
否 |
service-identity/internal/handler/dto.WebAuthnLoginResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
publicKey |
service-identity/internal/handler/dto.WebAuthnLoginOptionsResponse |
否 |
service-identity/internal/handler/dto.WebAuthnLoginResponseWrapper
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-identity/internal/handler/dto.WebAuthnLoginResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |