pub struct SSOAuth { /* private fields */ }
Implementations§
Source§impl SSOAuth
impl SSOAuth
Sourcepub async fn try_login(self) -> Result<AuthResponse, SFError>
pub async fn try_login(self) -> Result<AuthResponse, SFError>
Tries to login. If the user has successfully authenticated via the
auth_url
, this will return the normal SFAccount
. Otherwise, this
will return the existing Auth for you to reattempt the login after a
few seconds
§Errors
May return ConnectionError
, or ParsingError
depending on what part
of the communication failed
Sourcepub async fn new(provider: SSOProvider) -> Result<Self, SFError>
pub async fn new(provider: SSOProvider) -> Result<Self, SFError>
Instantiates a new attempt to login through a SSO provider. A user then
has to interact with the auth_url
this returns to validate the
login. Afterwards you can login and transform this into a normal
SFAccount
§Errors
May return ConnectionError
, or ParsingError
depending on what part
of the communication failed
Sourcepub async fn new_with_options(
provider: SSOProvider,
options: ConnectionOptions,
) -> Result<Self, SFError>
pub async fn new_with_options( provider: SSOProvider, options: ConnectionOptions, ) -> Result<Self, SFError>
The same as new()
, but with optional connection options
§Errors
May return ConnectionError
, or ParsingError
depending on what part
of the communication failed