POST /mfa/credentials/{credential_id}/primary
将指定的MFA凭证设为该用户的主认证方式,同时取消其他凭证的主认证状态。参考:OWASP ASVS V2.8。
多因素认证 `bearerAuth` application/json
请求参数
| 名称 | 位置 | 类型 | 必填 | 默认值 | 示例 | 约束 | 描述 |
credential_id |
path |
string |
是 |
|
|
|
凭证ID |
引用的 Schema
service-core/base/dto.SimpleResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
code |
integer |
否 |
|
|
|
message |
string |
否 |
|
|
|
timestamp |
string |
否 |
|
|
|
service-mfa/internal/handler/dto.SetPrimaryCredentialDetailResponse
service-mfa/internal/handler/dto.SetPrimaryCredentialResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
credential_id |
string |
否 |
cred_abc123def456 |
|
|
primary |
boolean |
否 |
True |
|
|
type |
string |
否 |
totp |
|
|