跳到主要内容

getTfaSettings

TfaSettingsArrayWrapper getTfaSettings()

GET /api/2.0/settings/tfaapp

Get the TFA settings

Lists the two-factor authentication methods this portal offers, with the state of each one. The list carries at most two entries: sms, present only when the SMS method is enabled in the portal's configuration, and app, present only when the authenticator-application method is enabled there, so an empty list means neither method is offered here. Any authenticated member may call it, and what it returns is the portal-wide policy, not the caller's own linked credential. This is a read-only, idempotent call. For every entry enabled says whether that method is the current policy, available says whether it can actually be switched on (for sms that also requires a configured SMS provider), trustedIps lists the addresses and ranges exempt from the challenge, and mandatoryUsers and mandatoryGroups list the accounts that have to pass it even from a trusted address. Change the policy with PUT api/2.0/settings/tfaapp, and read the caller's own backup codes with GET api/2.0/settings/tfaappcodes.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The TFA methods the portal offers, with the portal-wide state of eachTfaSettingsArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

TfaSettingsArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json