Docs › API Reference › MFA Service › POST /mfa/credentials/{credential_id}/primary
POST /mfa/credentials/{credential_id}/primary
Set the specified MFA credential as the user's primary authentication method, while removing primary status from other credentials. Reference: OWASP ASVS V2.8.
Multi-Factor Authentication `bearerAuth` application/json
Request Parameters
Name In Type Required Default Example Constraints Description
id
path
string
Yes
Credential ID
Referenced Schemas
dto.SetPrimaryCredentialDetailResponse
dto.SetPrimaryCredentialResponse
Field Type Required Example Constraints Description
credential_id
string
No
cred_abc123def456
primary
boolean
No
True
type
string
No
totp
gitee_com_linmes_authms_base_dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No