olp-cpp-sdk
1.22.0
|
Provides the authentication tokens if the HERE platform user credentials are valid. More...
#include <TokenProvider.h>
Public Member Functions | |
TokenProvider (Settings settings) | |
Creates the TokenProvider instance with the settings parameter. More... | |
TokenProvider (const TokenProvider &other)=default | |
A default copy constructor. | |
TokenProvider (TokenProvider &&other) noexcept=default | |
A default move constructor. | |
TokenProvider & | operator= (const TokenProvider &other)=default |
A default copy assignment operator. | |
TokenProvider & | operator= (TokenProvider &&other) noexcept=default |
A default move assignment operator. | |
operator bool () const | |
Casts the TokenProvider instance to the bool type. More... | |
client::OauthTokenResponse | operator() (client::CancellationContext &context) const |
Returns the access token or an error. More... | |
ErrorResponse | GetErrorResponse () const |
Allows the olp::client::ApiError object associated with the last request to be accessed if the token request is unsuccessful. More... | |
int | GetHttpStatusCode () const |
Gets the HTTP status code of the last request. More... | |
Provides the authentication tokens if the HERE platform user credentials are valid.
MinimumValidity | The minimum token validity time (in seconds). To use the default MinimumValidity value, use the TokenProviderDefault typedef. |
TokenProviderDefault
|
inlineexplicit |
Creates the TokenProvider
instance with the settings
parameter.
settings | The settings that can be used to configure the TokenEndpoint instance. |
|
inline |
Allows the olp::client::ApiError
object associated with the last request to be accessed if the token request is unsuccessful.
|
inline |
Gets the HTTP status code of the last request.
|
inline |
Casts the TokenProvider
instance to the bool
type.
Returns true if the previous token request was successful.
|
inline |
Returns the access token or an error.
context | Used to cancel the pending token request. |
OauthTokenResponse
if the response is successful; an ApiError
otherwise.