21namespace Azure {
namespace Core {
namespace Credentials {
70 std::string m_credentialName;
85 Context const& context)
const = 0;
106 : m_credentialName(credentialName.empty() ?
"Custom Credential" : credentialName)
155 char const*
what() const noexcept
override {
return m_what.c_str(); }
A context is a node within a unidirectional tree that represents deadlines and key/value pairs.
Definition context.hpp:72
An exception that gets thrown when an authentication error occurs.
Definition credentials.hpp:137
AuthenticationException(std::string what)
Constructs AuthenticationException with a message string.
Definition credentials.hpp:146
char const * what() const noexcept override
Definition credentials.hpp:155
A base type of credential that uses Azure::Core::AccessToken to authenticate requests.
Definition credentials.hpp:68
std::string const & GetCredentialName() const
Gets the name of the credential.
Definition credentials.hpp:91
virtual AccessToken GetToken(TokenRequestContext const &tokenRequestContext, Context const &context) const =0
Gets an authentication token.
TokenCredential()
Constructs a default instance of TokenCredential.
Definition credentials.hpp:115
TokenCredential(std::string const &credentialName)
Constructs an instance of TokenCredential.
Definition credentials.hpp:105
virtual ~TokenCredential()=default
Destructs TokenCredential.
Manages date and time in standardized string formats.
Definition datetime.hpp:54
Context for canceling long running operations.
Support for date and time standardized string formats.
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57
An access token is used to authenticate requests.
Definition credentials.hpp:27
std::string Token
Token string.
Definition credentials.hpp:32
DateTime ExpiresOn
A point in time after which the token expires.
Definition credentials.hpp:38
Context for getting token.
Definition credentials.hpp:45
std::vector< std::string > Scopes
Authentication scopes.
Definition credentials.hpp:50
DateTime::duration MinimumExpiration
Minimum token expiration suggestion.
Definition credentials.hpp:56
std::string TenantId
Tenant ID.
Definition credentials.hpp:62