Class TokenProvider allows to retrieve access token for mail services. More...
Inherits Aspose::Email::Clients::ITokenProvider.
Classes | |
class | |
Provides an instance of the TokenProvider for Google mail server More... | |
class | Outlook |
Provides an instance of the TokenProvider for Outlook mail server More... | |
Public Member Functions | |
virtual bool | get_UseBasicAuthorization () |
Gets value which indicates whether basic authorization is used More... | |
virtual void | set_UseBasicAuthorization (bool value) |
Sets value which indicates whether basic authorization is used More... | |
virtual System::String | get_Login () |
Gets login for basic authorization More... | |
virtual void | set_Login (System::String value) |
Sets login for basic authorization More... | |
virtual System::String | get_Password () |
Gets password for basic authorization More... | |
virtual void | set_Password (System::String value) |
Sets password for basic authorization More... | |
virtual System::String | get_RequestUrl () |
The url to obtain access token. More... | |
virtual System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::String > > | get_ExtraParameters () |
Gets extra parameters for request More... | |
virtual System::String | get_ClientId () |
The client ID obtained during application registration. More... | |
virtual System::String | get_ClientSecret () |
The client secret obtained during application registration. More... | |
virtual System::String | get_RefreshToken () |
OAuth 2.0 refresh token More... | |
TokenProvider (System::String requestUrl, System::String clientId, System::String clientSecret, System::String refreshToken) | |
Initializes a new instance of the TokenProvider class More... | |
TokenProvider (System::String requestUrl, System::String clientId, System::String clientSecret, System::String refreshToken, System::String login, System::String password) | |
Initializes a new instance of the TokenProvider class More... | |
TokenProvider (System::String requestUrl, System::String clientId, System::String clientSecret, System::String refreshToken, System::String login, System::String password, System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::String >> extraParameters) | |
Initializes a new instance of the TokenProvider class More... | |
TokenProvider (System::String requestUrl, System::String clientId, System::String clientSecret, System::String refreshToken, System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::String >> extraParameters) | |
Initializes a new instance of the TokenProvider class More... | |
void | Dispose () override |
Performs releasing resources. More... | |
System::SharedPtr< OAuthToken > | GetAccessToken () override |
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... | |
System::SharedPtr< OAuthToken > | GetAccessToken (bool ignoreExistingToken) override |
Gets oAuth access token. More... | |
virtual System::SharedPtr< OAuthToken > | getAccessToken () |
Gets oAuth access token. More... | |
Static Public Member Functions | |
static System::SharedPtr< TokenProvider > | GetInstance (System::String requestUrl, System::String clientId, System::String clientSecret, System::String refreshToken) |
Gets an instance of the OutlookTokenProvider for defined parameters. More... | |
Class TokenProvider allows to retrieve access token for mail services.
Aspose::Email::Clients::TokenProvider::TokenProvider | ( | System::String | requestUrl, |
System::String | clientId, | ||
System::String | clientSecret, | ||
System::String | refreshToken | ||
) |
Initializes a new instance of the TokenProvider class
requestUrl | The url to obtain access token. |
clientId | The client ID obtained from the Microsoft account Developer Center during application registration. |
clientSecret | The client secret obtained during application registration. |
refreshToken | OAuth 2.0 refresh token |
Aspose::Email::Clients::TokenProvider::TokenProvider | ( | System::String | requestUrl, |
System::String | clientId, | ||
System::String | clientSecret, | ||
System::String | refreshToken, | ||
System::String | login, | ||
System::String | password | ||
) |
Initializes a new instance of the TokenProvider class
requestUrl | The url to obtain access token. |
clientId | The client ID obtained from the Microsoft account Developer Center during application registration. |
clientSecret | The client secret obtained during application registration. |
refreshToken | OAuth 2.0 refresh token |
login | login for basic authorization |
password | password for basic authorization |
Aspose::Email::Clients::TokenProvider::TokenProvider | ( | System::String | requestUrl, |
System::String | clientId, | ||
System::String | clientSecret, | ||
System::String | refreshToken, | ||
System::String | login, | ||
System::String | password, | ||
System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::String >> | extraParameters | ||
) |
Initializes a new instance of the TokenProvider class
requestUrl | The url to obtain access token. |
clientId | The client ID obtained from the Microsoft account Developer Center during application registration. |
clientSecret | The client secret obtained during application registration. |
refreshToken | OAuth 2.0 refresh token |
login | login for basic authorization |
password | password for basic authorization |
extraParameters |
Aspose::Email::Clients::TokenProvider::TokenProvider | ( | System::String | requestUrl, |
System::String | clientId, | ||
System::String | clientSecret, | ||
System::String | refreshToken, | ||
System::ArrayPtr< System::Collections::Generic::KeyValuePair< System::String, System::String >> | extraParameters | ||
) |
Initializes a new instance of the TokenProvider class
requestUrl | The url to obtain access token. |
clientId | The client ID obtained from the Microsoft account Developer Center during application registration. |
clientSecret | The client secret obtained during application registration. |
refreshToken | OAuth 2.0 refresh token |
extraParameters |
|
override |
Performs releasing resources.
|
virtual |
The client ID obtained during application registration.
|
virtual |
The client secret obtained during application registration.
|
virtual |
Gets extra parameters for request
|
virtual |
Gets login for basic authorization
|
virtual |
Gets password for basic authorization
|
virtual |
OAuth 2.0 refresh token
|
virtual |
The url to obtain access token.
|
virtual |
Gets value which indicates whether basic authorization is used
|
virtual |
Gets oAuth access token.
|
overridevirtual |
Gets oAuth access token. If token exists and its expiration date is not expired returns current token, otherwise requests new token from a server.
Implements Aspose::Email::Clients::ITokenProvider.
|
overridevirtual |
Gets oAuth access token.
ignoreExistingToken | If 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. |
Implements Aspose::Email::Clients::ITokenProvider.
|
static |
Gets an instance of the OutlookTokenProvider for defined parameters.
requestUrl | The url to obtain access token. |
clientId | The client ID obtained from the Microsoft account Developer Center during application registration. |
clientSecret | The client secret obtained during application registration. |
refreshToken | OAuth 2.0 refresh token |
|
virtual |
Sets login for basic authorization
|
virtual |
Sets password for basic authorization
|
virtual |
Sets value which indicates whether basic authorization is used