Ditto  1.0.9
Public Member Functions | List of all members
ditto::Authenticator Class Reference

Public Member Functions

void login_with_token (std::string token, std::string provider, std::function< void(std::unique_ptr< DittoError >)> login_handler)
 Log in to Ditto with a third-party token. More...
 
void login_with_credentials (std::string username, std::string password, std::string provider, std::function< void(std::unique_ptr< DittoError >)> login_handler)
 Log in to Ditto with a username and password. More...
 

Member Function Documentation

◆ login_with_credentials()

void ditto::Authenticator::login_with_credentials ( std::string  username,
std::string  password,
std::string  provider,
std::function< void(std::unique_ptr< DittoError >)>  login_handler 
)

Log in to Ditto with a username and password.

Parameters
[in]usernamethe username component of the credentials used for log in.
[in]passwordthe password component of the credentials used for log in.
[in]providerthe name of the authentication provider.
[in]login_handlera lambda that will get called when the login attempt has completed.

◆ login_with_token()

void ditto::Authenticator::login_with_token ( std::string  token,
std::string  provider,
std::function< void(std::unique_ptr< DittoError >)>  login_handler 
)

Log in to Ditto with a third-party token.

Parameters
[in]tokenthe authentication token required to log in.
[in]providerthe name of the authentication provider.
[in]login_handlera lambda that will get called when the login attempt has completed.