Struct amazon_cognito_rust::CognitoUser
[−]
[src]
pub struct CognitoUser<S: Storage> { /* fields omitted */ }
Methods
impl<S: Storage> CognitoUser<S>
[src]
fn new(
dispatcher: Client,
storage: Rc<RefCell<S>>,
user_pool_id: &str,
client_id: &str,
region: Region
) -> CognitoUser<S>
[src]
dispatcher: Client,
storage: Rc<RefCell<S>>,
user_pool_id: &str,
client_id: &str,
region: Region
) -> CognitoUser<S>
fn refresh_session(
&self,
refresh_token: &str
) -> Result<CognitoUserSession, Error>
[src]
&self,
refresh_token: &str
) -> Result<CognitoUserSession, Error>
This uses the refreshToken to retrieve a new session
@param {CognitoRefreshToken} refreshToken A previous session's refresh token.
@param {nodeCallback
fn clear_cached_tokens(&self)
[src]
This is used to clear the session tokens from local storage @returns {void}
fn access_token(&self) -> Result<String, Error>
[src]
fn id_token(&self) -> Result<String, Error>
[src]
fn refresh_token(&self) -> Result<String, Error>
[src]
fn authenticate_user<D: AuthDelegate>(
&self,
auth_details: &AuthDetails,
delegate: &D
) -> Result<(), Error>
[src]
&self,
auth_details: &AuthDetails,
delegate: &D
) -> Result<(), Error>
This is used for authenticating the user. it calls the AuthenticationHelper for SRP related stuff @param {AuthenticationDetails} authDetails Contains the authentication data @param {object} callback Result callback map. @param {onFailure} callback.onFailure Called on any error. @param {newPasswordRequired} callback.newPasswordRequired new password and any required attributes are required to continue @param {mfaRequired} callback.mfaRequired MFA code required to continue. @param {customChallenge} callback.customChallenge Custom challenge response required to continue. @param {authSuccess} callback.onSuccess Called on success with the new session. @returns {void}