Class AbstractRemoteAuthTokenAPIHandler.Conf<T extends AbstractRemoteAuthTokenAPIHandler.Conf<T>>
- java.lang.Object
-
- co.arago.hiro.client.connection.AbstractAPIHandler.Conf<T>
-
- co.arago.hiro.client.connection.AbstractVersionAPIHandler.Conf<T>
-
- co.arago.hiro.client.connection.token.AbstractTokenAPIHandler.Conf<T>
-
- co.arago.hiro.client.connection.token.AbstractRemoteAuthTokenAPIHandler.Conf<T>
-
- All Implemented Interfaces:
HttpClientHandler.ConfTemplate<T>
- Direct Known Subclasses:
CodeFlowAuthTokenAPIHandler.Conf,PasswordAuthTokenAPIHandler.Conf
- Enclosing class:
- AbstractRemoteAuthTokenAPIHandler
public abstract static class AbstractRemoteAuthTokenAPIHandler.Conf<T extends AbstractRemoteAuthTokenAPIHandler.Conf<T>> extends AbstractTokenAPIHandler.Conf<T>
-
-
Constructor Summary
Constructors Constructor Description Conf()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractRemoteAuthTokenAPIHandlerbuild()java.lang.StringgetApiPath()java.lang.StringgetClientId()java.lang.StringgetClientSecret()booleangetForceLogging()java.lang.StringgetOrganization()java.lang.StringgetOrganizationId()java.lang.LonggetRefreshOffset()TsetApiPath(java.lang.String apiPath)TsetClientId(java.lang.String clientId)TsetClientSecret(java.lang.String clientSecret)TsetCredentials(java.lang.String username, java.lang.String password, java.lang.String clientId, java.lang.String clientSecret)Shorthand to set all credentials at once.TsetForceLogging(boolean forceLogging)Force logging of insecure request / response data.TsetOrganization(java.lang.String organization)TsetOrganizationId(java.lang.String organizationId)TsetRefreshOffset(java.lang.Long refreshOffset)Timespan that gets subtracted from the official expiration instant of a token so the token can be refreshed before it runs out.-
Methods inherited from class co.arago.hiro.client.connection.AbstractVersionAPIHandler.Conf
getSharedConnectionHandler, setSharedConnectionHandler
-
Methods inherited from class co.arago.hiro.client.connection.AbstractAPIHandler.Conf
getAcceptAllCerts, getConnectTimeout, getCookieManager, getHttpClient, getHttpClientAutoClose, getHttpClientHandler, getHttpRequestTimeout, getMaxBinaryLogLength, getMaxConnectionPool, getMaxRetries, getProxy, getRootApiURI, getShutdownTimeout, getSslContext, getSslParameters, getUserAgent, getWebSocketURI, isFollowRedirects, self, setAcceptAllCerts, setConnectTimeout, setCookieManager, setFollowRedirects, setHttpClient, setHttpClientAutoClose, setHttpClientHandler, setHttpRequestTimeout, setMaxBinaryLogLength, setMaxConnectionPool, setMaxRetries, setProxy, setRootApiURI, setRootApiURI, setShutdownTimeout, setSslContext, setSslParameters, setUserAgent, setWebSocketURI, setWebSocketURI
-
-
-
-
Method Detail
-
getOrganization
public java.lang.String getOrganization()
-
setOrganization
public T setOrganization(java.lang.String organization)
- Parameters:
organization- Optional HIRO organization name for returned token- Returns:
AbstractAPIHandler.Conf.self()
-
getOrganizationId
public java.lang.String getOrganizationId()
-
setOrganizationId
public T setOrganizationId(java.lang.String organizationId)
- Parameters:
organizationId- Optional HIRO organization id for returned token. Overrides organziation field.- Returns:
AbstractAPIHandler.Conf.self()
-
getClientId
public java.lang.String getClientId()
-
setClientId
public T setClientId(java.lang.String clientId)
- Parameters:
clientId- HIRO client_id of app- Returns:
AbstractAPIHandler.Conf.self()
-
getClientSecret
public java.lang.String getClientSecret()
-
setClientSecret
public T setClientSecret(java.lang.String clientSecret)
- Parameters:
clientSecret- HIRO client_secret of app- Returns:
AbstractAPIHandler.Conf.self()
-
setCredentials
public T setCredentials(java.lang.String username, java.lang.String password, java.lang.String clientId, java.lang.String clientSecret)
Shorthand to set all credentials at once.- Parameters:
username- HIRO username for user accountpassword- HIRO password for user accountclientId- HIRO client_id of appclientSecret- HIRO client_secret of app- Returns:
AbstractAPIHandler.Conf.self()
-
getRefreshOffset
public java.lang.Long getRefreshOffset()
-
setRefreshOffset
public T setRefreshOffset(java.lang.Long refreshOffset)
Timespan that gets subtracted from the official expiration instant of a token so the token can be refreshed before it runs out. Default is 5000 (5s).- Parameters:
refreshOffset- Offset in ms- Returns:
AbstractAPIHandler.Conf.self()
-
getForceLogging
public boolean getForceLogging()
-
setForceLogging
public T setForceLogging(boolean forceLogging)
Force logging of insecure request / response data. USE ONLY FOR DEBUGGING PURPOSES!!!- Parameters:
forceLogging- the flag to set.- Returns:
AbstractAPIHandler.Conf.self()
-
getApiPath
public java.lang.String getApiPath()
-
setApiPath
public T setApiPath(java.lang.String apiPath)
- Parameters:
apiPath- The apiPath set externally. Overrides the fetching of the endpoint via /api/version.- Returns:
AbstractAPIHandler.Conf.self()
-
build
public abstract AbstractRemoteAuthTokenAPIHandler build()
- Specified by:
buildin classAbstractTokenAPIHandler.Conf<T extends AbstractRemoteAuthTokenAPIHandler.Conf<T>>
-
-