java.lang.Object
org.refcodes.web.OauthToken
org.refcodes.rest.OauthTokenHandler
- All Implemented Interfaces:
org.refcodes.mixin.Disposable,org.refcodes.mixin.ValidAccessor
public class OauthTokenHandler
extends org.refcodes.web.OauthToken
Self refreshing implementation of the
OauthToken. In case a refresh
token (as of OauthToken.getRefreshToken() and has been provided, then the
access token (as of OauthToken.getAccessToken() is refreshed within the
"expires in" time (as of OauthToken.getExpiresIn(). The refresh daemon
terminates and this instance is disposed when the provided
RestfulHttpClient's Closable.close() method is
called or the dispose() method is invoked.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.ValidAccessor
org.refcodes.mixin.ValidAccessor.ValidBuilder<B extends org.refcodes.mixin.ValidAccessor.ValidBuilder<B>>, org.refcodes.mixin.ValidAccessor.ValidMutator, org.refcodes.mixin.ValidAccessor.ValidProperty -
Field Summary
Fields inherited from class org.refcodes.web.OauthToken
_accessToken, _customGrant, _expiresIn, _grantType, _isDisposed, _notBeforePolicy, _refreshExpiresIn, _refreshToken, _scope, _sessionState, _tokenType -
Constructor Summary
ConstructorsConstructorDescriptionOauthTokenHandler(String aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, org.refcodes.web.OauthToken aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(String aUrl, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.HttpBodyMap aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.HttpBodyMap aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.HttpBodyMap aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.HttpBodyMap aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.HttpBodyMap aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.HttpBodyMap aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.OauthToken aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters. -
Method Summary
Methods inherited from class org.refcodes.web.OauthToken
getAccessToken, getExpiresIn, getGrantType, getNotBeforePolicy, getRefreshExpiresIn, getRefreshToken, getScope, getSessionState, getTokenType, isValid, toString, updateToken
-
Constructor Details
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.HttpBodyMap aOauthToken) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheHttpBodyMapcontaining the OAuth token with the required information.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.OauthToken aOauthToken) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheOauthTokencontaining the required information.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheOauthTokencontaining the required information.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.HttpBodyMap aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheHttpBodyMapcontaining the OAuth token with the required information.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheOauthTokencontaining the required information.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheOauthTokencontaining the required information.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope) Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.HttpBodyMap aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheHttpBodyMapcontaining the OAuth token with the required information.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.HttpBodyMap aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheHttpBodyMapcontaining the OAuth token with the required information.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, int aTokenRefreshRetries, long aTokenRefreshRetryWaitTimeMillis, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetries- The number of retries when refreshing a token fails.aTokenRefreshRetryWaitTimeMillis- The time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, IOException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, String aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aClientId, String aClientSecret, String aUserName, String aUserPassword, org.refcodes.web.GrantType aGrantType, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws org.refcodes.web.HttpStatusException, MalformedURLException Constructs an instance of theOauthTokenHandlerwith the given parameters by using the user's name and password for a "password" grant type authentication to retrieve aOauthToken.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aClientId- The client's TID for "password" grant type.aClientSecret- The client's secret for "password" grant type.aUserName- The user's name for "password" grant type.aUserPassword- The user's password for "password" grant type.aGrantType- TheGrantTypeto use.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
org.refcodes.web.HttpStatusException- thrown in case a HTTP response was of an erroneous status.MalformedURLException- thrown in case of a malformed URL.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.HttpBodyMap aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheHttpBodyMapcontaining the OAuth token with the required information.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) throws IOException Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.- Throws:
IOException- in case connecting the the token endpoint failed due to I/O problems or malformed ULR issues.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.HttpBodyMap aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheHttpBodyMapcontaining the OAuth token with the required information.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- The URL to be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(org.refcodes.web.Url aUrl, RestfulHttpClient aHttpRestClient, org.refcodes.web.OauthToken aOauthToken, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters.- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aOauthToken- TheOauthTokencontaining the required information.aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
OauthTokenHandler
public OauthTokenHandler(String aUrl, RestfulHttpClient aHttpRestClient, String aAccessToken, String aRefreshToken, String aTokenType, Integer aExpiresIn, String aScope, org.refcodes.controlflow.RetryCounter aTokenRefreshRetryCounter, long aServerRecoveryWaitTimeMillis) Constructs an instance of theOauthTokenHandlerwith the given parameters. For the refresh token parameters, please refer to "https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens".- Parameters:
aUrl- TheUrlto be used when refreshing the access token.aHttpRestClient- TheRestfulHttpClientto use when refreshing the token.aAccessToken- The access token to be stored (as ofOauthToken.getAccessToken()).aRefreshToken- The refresh token to be used (as ofOauthToken.getRefreshToken()).aTokenType- The token type to be stored (as ofOauthToken.getTokenType()).aExpiresIn- The "expires in" time to be stored (as ofOauthToken.getExpiresIn()).aScope- The scope to be stored (as ofOauthToken.getScope()).aTokenRefreshRetryCounter- TheRetryCountertaking care of the number of retries and the time to wait between each retry when refreshing a token fails.aServerRecoveryWaitTimeMillis- The time to wait in case the count of the token refresh retries is exceeded.
-
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.refcodes.mixin.Disposable- Overrides:
disposein classorg.refcodes.web.OauthToken
-