POST /auth/webauthn/register/begin
生成注册挑战和凭证创建选项,返回给前端调用 navigator.credentials.create()
WebAuthn `bearerAuth` application/json
请求体
Schema: handler.beginRegistrationRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
password |
string |
是 |
|
length: 1–? |
|
display_name |
string |
否 |
|
|
|
user_name |
string |
否 |
|
|
UserName 仅作凭据 label可缺省,服务端派生链补全(user_name → email → user-<id>)。 |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
code |
integer |
否 |
|
|
|
message |
string |
否 |
|
|
|
timestamp |
string |
否 |
|
|
|
service-identity/internal/handler/dto.WebAuthnAuthenticatorSelection
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
authenticatorAttachment |
string |
否 |
|
|
|
residentKey |
string |
否 |
|
|
|
userVerification |
string |
否 |
|
|
|
service-identity/internal/handler/dto.WebAuthnCredentialParameter
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
alg |
integer |
否 |
|
|
|
type |
string |
否 |
|
|
|
service-identity/internal/handler/dto.WebAuthnRPEntity
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
id |
string |
否 |
|
|
|
name |
string |
否 |
|
|
|
service-identity/internal/handler/dto.WebAuthnRegistrationOptionsResponse
WebAuthn navigator.credentials.create() 的 publicKey 参数
service-identity/internal/handler/dto.WebAuthnRegistrationResponse
service-identity/internal/handler/dto.WebAuthnRegistrationResponseWrapper
service-identity/internal/handler/dto.WebAuthnUserEntity
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
displayName |
string |
否 |
|
|
|
id |
string |
否 |
|
|
|
name |
string |
否 |
|
|
|