ark::aws::Authenticator

Defined in header “ark/aws/authenticator.hh”.


This class will look for any stored authentication data in the user’s HOME directory.

Methods

  • Authenticator()
    Constructor loads with well-known defaults.

  • Authenticator(const AuthenticationConfig & config)
    Constructor this will also load any cached authentication data.

  • ~Authenticator()
    destructor

  • AwsTemporaryCredentials full_authentication(const std::string & username, const std::string & password)
    Do a full re-authentication, retrieving fresh JWT based on the given username and password. Only refresh the AWS credentials if explicitly requested in configuration.

  • AwsTemporaryCredentials refresh_authentication()
    Refresh credentials using a refresh token. This refreshes both the JWT and the AWS credentials, if requested in configuration.

  • std::optional< AwsTemporaryCredentials > get_aws_credentials()
    Retreive any AWS credentials that have been retrieve/loaded.

  • IdentityProviderTokens get_jwt()
    Returns the JWT, if it is available.

  • AuthenticationState get_state()
    Return the current state.

  • void clear_token()
    Clear token.

  • std::string username()
    Retrieve the username associated with the authentication. This is either set by the request for authentication or pulled from the refresh token.

  • bool access_token_valid()
    Returns true if the JWT access token is valid, false otherwise.

  • bool refresh_token_valid()
    Returns true if the JWT refresh token is valid, false otherwise.

  • bool should_refresh()
    Returns true if your can and should call refresh_authentication(). This will be true if you have a valid refresh token, but your access token is expired.

  • void update_default_profile_configuration(bool set_default_profile)
    Update configuration for saving credentials as the default profile.