Class AuthPhoneService

Inheritance Relationships

Base Type

Class Documentation

class AuthPhoneService : public axr::sdk::ServiceBase<AuthToken>

Public Functions

inline AuthPhoneService(std::shared_ptr<Configuration> config, std::shared_ptr<net::IApiClient> apiClient)
inline ~AuthPhoneService()
pplx::task<std::shared_ptr<AuthToken>> Authenticate(const utility::char_t *phone, const utility::char_t *code)

Retrieves an authorization token using a given phone number and totp code.

Parameters
  • phone – The unique phone number of the user to authenticate with.

  • code – The time-based one-time password code sent to the user’s phone number.

Returns

A task whose result is the authentication token.

pplx::task<std::shared_ptr<AuthToken>> Authenticate(const utility::string_t &phone, const utility::string_t &code)

Retrieves an authorization token using a given email and totp code.

Parameters
  • phone – The unique name of the user to authenticate with.

  • code – The time-based one-time password code sent to the user’s phone number.

Returns

A task whose result is the authentication token.

pplx::task<void> SendCode(const utility::char_t *phone)

Requests a time-based one-time password code to be sent to the phone number associated with a registered user.

Parameters

phone – The unique phone number of the user to send a TOTP code to.

Returns

A task whose result is the authentication token.

pplx::task<void> SendCode(const utility::string_t &phone)

Requests a time-based one-time password code to be sent to the phone number associated with a registered user.

Parameters

phone – The unique phone number of the user to send a TOTP code to.

Returns

A task whose result is the authentication token.

Public Static Functions

static inline const utility::char_t *ClassName()

Returns the fully qualified name of the class.