Open 3D Engine AWSClientAuth Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | List of all members
AWSClientAuth::IAuthenticationProviderRequests Class Referenceabstract

Abstract class for authentication provider requests. More...

#include <AuthenticationProviderBus.h>

Public Member Functions

 AZ_TYPE_INFO (IAuthenticationProviderRequests, "{4A8017C4-2742-48C4-AF07-1177CBF5E6E9}")
 
virtual bool Initialize (const AZStd::vector< ProviderNameEnum > &providerNames)=0
 
virtual bool IsSignedIn (const ProviderNameEnum &providerName)=0
 
virtual AuthenticationTokens GetAuthenticationTokens (const ProviderNameEnum &providerName)=0
 
virtual void PasswordGrantSingleFactorSignInAsync (const ProviderNameEnum &providerName, const AZStd::string &username, const AZStd::string &password)=0
 
virtual void PasswordGrantMultiFactorSignInAsync (const ProviderNameEnum &providerName, const AZStd::string &username, const AZStd::string &password)=0
 
virtual void PasswordGrantMultiFactorConfirmSignInAsync (const ProviderNameEnum &providerName, const AZStd::string &username, const AZStd::string &confirmationCode)=0
 
virtual void DeviceCodeGrantSignInAsync (const ProviderNameEnum &providerName)=0
 
virtual void DeviceCodeGrantConfirmSignInAsync (const ProviderNameEnum &providerName)=0
 
virtual void RefreshTokensAsync (const ProviderNameEnum &providerName)=0
 
virtual void GetTokensWithRefreshAsync (const ProviderNameEnum &providerName)=0
 
virtual bool SignOut (const ProviderNameEnum &providerName)=0
 

Detailed Description

Abstract class for authentication provider requests.

Member Function Documentation

◆ DeviceCodeGrantConfirmSignInAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::DeviceCodeGrantConfirmSignInAsync ( const ProviderNameEnum &  providerName)
pure virtual

Call tokens endpoint for provider device grant flow.

Parameters
providerNameProvider to call device confirm sign in.

◆ DeviceCodeGrantSignInAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::DeviceCodeGrantSignInAsync ( const ProviderNameEnum &  providerName)
pure virtual

Call code-pair endpoint for provider device grant flow.

Parameters
providerNameProvider to call device sign in.

◆ GetAuthenticationTokens()

virtual AuthenticationTokens AWSClientAuth::IAuthenticationProviderRequests::GetAuthenticationTokens ( const ProviderNameEnum &  providerName)
pure virtual

[Deprecated] Get cached tokens from last successful sign-in for the provider. To enhance security, only the refresh token is cached and will be returned by this function. If you need the access or ID tokens, all authentication tokens (access token, ID token and refresh token) can be retrieved by implementing custom handlers for AuthenticationProviderNotifications in your project code.

Parameters
providerNameProvider to get authentication tokens.
Returns
AuthenticationTokens tokens from successful authentication.

◆ GetTokensWithRefreshAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::GetTokensWithRefreshAsync ( const ProviderNameEnum &  providerName)
pure virtual

Call refresh token if token not valid. If token valid, fires corresponding event.

Parameters
providerNameProvider to get access token for. events: OnRefreshTokensSuccess, OnRefreshTokensFail

◆ Initialize()

virtual bool AWSClientAuth::IAuthenticationProviderRequests::Initialize ( const AZStd::vector< ProviderNameEnum > &  providerNames)
pure virtual

Parse the settings file for required settings for authentication providers. Instantiate and initialize authentication providers

Parameters
providerNamesList of provider names to instantiate and initialize for Authentication.
Returns
bool True: if all providers initialized successfully. False: If any provider fails initialization.

◆ IsSignedIn()

virtual bool AWSClientAuth::IAuthenticationProviderRequests::IsSignedIn ( const ProviderNameEnum &  providerName)
pure virtual

Checks if user is signed in. If access tokens are available and not expired.

Parameters
providerNameProvider to check signed in for
Returns
bool True if valid access token available, else False

◆ PasswordGrantMultiFactorConfirmSignInAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::PasswordGrantMultiFactorConfirmSignInAsync ( const ProviderNameEnum &  providerName,
const AZStd::string &  username,
const AZStd::string &  confirmationCode 
)
pure virtual

Call confirm endpoint for provider password grant multi factor authentication flow .

Parameters
providerNameProvider to call MFA confirm sign in.
usernameUsername to use for MFA confirm.
confirmationCodeConfirmation code (sent to email/text) to use for MFA confirm.

◆ PasswordGrantMultiFactorSignInAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::PasswordGrantMultiFactorSignInAsync ( const ProviderNameEnum &  providerName,
const AZStd::string &  username,
const AZStd::string &  password 
)
pure virtual

Call sign in endpoint for provider password grant multi factor authentication flow.

Parameters
providerNameProvider to call MFA sign in.
usernameUsername to use for MFA sign in.
passwordPassword to use for MFA sign in.

◆ PasswordGrantSingleFactorSignInAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::PasswordGrantSingleFactorSignInAsync ( const ProviderNameEnum &  providerName,
const AZStd::string &  username,
const AZStd::string &  password 
)
pure virtual

Call sign in endpoint for provider password grant flow.

Parameters
providerNameProvider to call sign in.
usernameUsername to use to for sign in.
passwordPassword to use to for sign in.

◆ RefreshTokensAsync()

virtual void AWSClientAuth::IAuthenticationProviderRequests::RefreshTokensAsync ( const ProviderNameEnum &  providerName)
pure virtual

Call refresh endpoint for provider refresh grant flow.

Parameters
providerNameProvider to call refresh tokens.

◆ SignOut()

virtual bool AWSClientAuth::IAuthenticationProviderRequests::SignOut ( const ProviderNameEnum &  providerName)
pure virtual

Signs user out. Clears all cached tokens.

Parameters
providerNameProvider to sign out.
Returns
bool True: Successfully sign out.

The documentation for this class was generated from the following file: