Aspose::Email::Clients::ITokenProvider Class Referenceabstract

Defines interface allowing to retrieve access token. More...

Inherits IDisposable.

Inherited by Aspose::Email::Clients::TokenProvider.

Public Member Functions

virtual System::SharedPtr< OAuthTokenGetAccessToken ()=0
 Gets oAuth access token. If token exists and its expiration date is not expired returns current token, otherwise requests new token from a server. More...
 
virtual System::SharedPtr< OAuthTokenGetAccessToken (bool ignoreExistingToken)=0
 Gets oAuth access token. More...
 

Detailed Description

Defines interface allowing to retrieve access token.

Member Function Documentation

◆ GetAccessToken() [1/2]

virtual System::SharedPtr<OAuthToken> Aspose::Email::Clients::ITokenProvider::GetAccessToken ( )
pure virtual

Gets oAuth access token. If token exists and its expiration date is not expired returns current token, otherwise requests new token from a server.

Returns
Returns oAuth access token

Implemented in Aspose::Email::Clients::TokenProvider.

◆ GetAccessToken() [2/2]

virtual System::SharedPtr<OAuthToken> Aspose::Email::Clients::ITokenProvider::GetAccessToken ( bool  ignoreExistingToken)
pure virtual

Gets oAuth access token.

Parameters
ignoreExistingTokenIf ignoreExistingToken is true, requests new token from a server. Otherwise behaviour is depended on whether token exists or not. If token exists and its expiration date is not expired returns current token, otherwise requests new token from a server.
Returns
Returns oAuth access token

Implemented in Aspose::Email::Clients::TokenProvider.