Autional Autional
API Reference GitHub autional.com →

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

StatusDescriptionSchema
200Set successfullydto.SetPrimaryCredentialDetailResponse
400Invalid parametergitee_com_linmes_authms_base_dto.SimpleResponse
401Unauthenticatedgitee_com_linmes_authms_base_dto.SimpleResponse
404Credential not foundgitee_com_linmes_authms_base_dto.SimpleResponse
500Internal server errorgitee_com_linmes_authms_base_dto.SimpleResponse

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_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No