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

NameInTypeRequiredDefaultExampleConstraintsDescription
id path string Yes Credential ID

Request Body

Schema: dto.SetPrimaryCredentialRequest

FieldTypeRequiredExampleConstraintsDescription
type string Yes

Responses

Referenced Schemas

dto.SetPrimaryCredentialDetailResponse

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

dto.SetPrimaryCredentialResponse

FieldTypeRequiredExampleConstraintsDescription
credential_id string No cred_abc123def456
primary boolean No True
type string No totp

gitee_com_autional_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No