@ComponentProfile(summary="Make a HTTP(s) request to an OAUTH server and retrieve an access token", tag="service,http,https,oauth") public class GetOauthToken extends OauthTokenGetter
In the adapter configuration file this class is aliased as get-oauth-token which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
GetOauthToken() |
Modifier and Type | Method and Description |
---|---|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.String |
getRefreshTokenKey()
Deprecated.
|
java.lang.String |
getTokenExpiryKey()
Deprecated.
|
java.lang.String |
getTokenKey()
Deprecated.
|
void |
setRefreshTokenKey(java.lang.String key)
Deprecated.
|
void |
setTokenExpiryKey(java.lang.String key)
Deprecated.
|
void |
setTokenKey(java.lang.String key)
Deprecated.
|
protected AccessTokenWriter |
tokenWriterIfNull() |
GetOauthToken |
withRefreshTokenKey(java.lang.String refreshMetadataKey)
Deprecated.
|
GetOauthToken |
withTokenExpiryKey(java.lang.String b)
Deprecated.
|
GetOauthToken |
withTokenKey(java.lang.String b) |
closeService, getAccessTokenBuilder, getAccessTokenWriter, initService, prepare, setAccessTokenBuilder, setAccessTokenWriter, start, stop, tokenWriterToUse, withAccessTokenBuilder, withAccessTokenWriter
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected AccessTokenWriter tokenWriterIfNull()
tokenWriterIfNull
in class OauthTokenGetter
public GetOauthToken withTokenKey(java.lang.String b)
@Deprecated @ConfigDeprecated(removalVersion="3.12.0", message="Use a access-token-writer instead", groups=java.lang.Deprecated.class) public java.lang.String getTokenKey()
@Deprecated @Removal(version="3.12.0", message="Use a access-token-writer instead") public void setTokenKey(java.lang.String key)
key
- the key.@Deprecated @Removal(version="3.12.0", message="Use a access-token-writer instead") public GetOauthToken withTokenExpiryKey(java.lang.String b)
@Deprecated @ConfigDeprecated(removalVersion="3.12.0", message="Use a access-token-writer instead", groups=java.lang.Deprecated.class) public java.lang.String getTokenExpiryKey()
@Deprecated @Removal(version="3.12.0", message="Use a access-token-writer instead") public void setTokenExpiryKey(java.lang.String key)
In some cases, there is no expiry date for a token, in which case, the metadata key will never be set even if configured.
key
- key.@Deprecated @Removal(version="3.12.0", message="Use a access-token-write instead") public GetOauthToken withRefreshTokenKey(java.lang.String refreshMetadataKey)
@Deprecated @ConfigDeprecated(removalVersion="3.12.0", message="Use a access-token-write instead", groups=java.lang.Deprecated.class) public java.lang.String getRefreshTokenKey()
@Deprecated @Removal(version="3.12.0", message="Use a access-token-write instead") public void setRefreshTokenKey(java.lang.String key)
In some cases, there is no refresh token, in which case, the metadata key will never be set even if configured.
key
- key.