Class PasswordAuthTokenAPIHandler
- java.lang.Object
-
- co.arago.hiro.client.connection.AbstractAPIHandler
-
- co.arago.hiro.client.connection.AbstractVersionAPIHandler
-
- co.arago.hiro.client.connection.token.AbstractTokenAPIHandler
-
- co.arago.hiro.client.connection.token.AbstractRemoteAuthTokenAPIHandler
-
- co.arago.hiro.client.connection.token.PasswordAuthTokenAPIHandler
-
- All Implemented Interfaces:
TokenAPIHandler,java.lang.AutoCloseable
public class PasswordAuthTokenAPIHandler extends AbstractRemoteAuthTokenAPIHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPasswordAuthTokenAPIHandler.Builderstatic classPasswordAuthTokenAPIHandler.Conf<T extends PasswordAuthTokenAPIHandler.Conf<T>>-
Nested classes/interfaces inherited from class co.arago.hiro.client.connection.token.AbstractRemoteAuthTokenAPIHandler
AbstractRemoteAuthTokenAPIHandler.TokenInfo
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringpasswordprotected java.lang.Stringusername-
Fields inherited from class co.arago.hiro.client.connection.token.AbstractRemoteAuthTokenAPIHandler
apiName, apiPath, apiURI, clientId, clientSecret, organization, organizationId, tokenInfo
-
Fields inherited from class co.arago.hiro.client.connection.AbstractAPIHandler
httpClientHandler, httpRequestTimeout, maxRetries, rootApiURI, title, userAgent, version, webSocketURI
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPasswordAuthTokenAPIHandler(PasswordAuthTokenAPIHandler.Conf<?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PasswordAuthTokenAPIHandler.Conf<?>newBuilder()protected voidrequestToken(java.lang.String organization, java.lang.String organizationId)Obtain a new token from the auth API.-
Methods inherited from class co.arago.hiro.client.connection.token.AbstractRemoteAuthTokenAPIHandler
checkResponse, expiryInstant, getRefreshOffset, getRefreshToken, getToken, getURI, hasRefreshToken, hasToken, refreshToken, refreshToken, revokeToken, revokeToken, setRefreshOffset, tokenExpired
-
Methods inherited from class co.arago.hiro.client.connection.token.AbstractTokenAPIHandler
addToHeaders, close, decodeToken
-
Methods inherited from class co.arago.hiro.client.connection.AbstractVersionAPIHandler
getApiURIOf, getVersionMap, requestVersionMap
-
Methods inherited from class co.arago.hiro.client.connection.AbstractAPIHandler
addQueryFragmentAndNormalize, buildApiURI, buildEndpointURI, buildURI, buildWebSocketURI, delete, executeAsyncWithStreamBody, executeAsyncWithStringBody, executeBinary, executeWithStreamBody, executeWithStringBody, get, getBinary, getConf, getHttpLogger, getHttpRequestTimeout, getMaxRetries, getOrBuildClient, getRequestBuilder, getRootApiURI, getUserAgent, getWebSocketURI, patch, patchBinary, post, postBinary, put, putBinary, send, sendAsync
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface co.arago.hiro.client.connection.token.TokenAPIHandler
buildWebSocketURI, getApiURIOf, getConf, getOrBuildClient, getRootApiURI, getUserAgent, getVersionMap
-
-
-
-
Constructor Detail
-
PasswordAuthTokenAPIHandler
protected PasswordAuthTokenAPIHandler(PasswordAuthTokenAPIHandler.Conf<?> builder)
-
-
Method Detail
-
newBuilder
public static PasswordAuthTokenAPIHandler.Conf<?> newBuilder()
-
requestToken
protected void requestToken(java.lang.String organization, java.lang.String organizationId) throws java.io.IOException, java.lang.InterruptedException, HiroExceptionObtain a new token from the auth API.- Specified by:
requestTokenin classAbstractRemoteAuthTokenAPIHandler- Parameters:
organization- : Optional organization name. May be null.organizationId- : Optional organization id. May be null.- Throws:
java.lang.InterruptedException- When call gets interrupted.java.io.IOException- When call has IO errors.HiroException- On Hiro protocol / handling errors.
-
-