public interface TokenService
ClientToken.| Modifier and Type | Method and Description |
|---|---|
ClientToken |
forceRefresh(ClientConfiguration config,
ClientToken token)
Refreshes provided token.
|
boolean |
isRefreshNeeded(ClientToken token,
Duration margin)
Deprecated.
this logic is no longer part of the public API. Use
TokenHandler.getRefreshedToken(String, Duration) |
ClientToken |
refreshIfNeeded(ClientConfiguration config,
ClientToken token,
Duration margin)
Deprecated.
|
ClientToken forceRefresh(ClientConfiguration config, ClientToken token) throws TokenServiceException, IllegalArgumentException
config - OAuth client config for the given tokentoken - original tokenTokenServiceException - if there was an error while calling token endpointIllegalArgumentException - if token has no refresh token when it's requiredGrantType@Deprecated ClientToken refreshIfNeeded(ClientConfiguration config, ClientToken token, Duration margin) throws TokenServiceException
TokenHandler.getRefreshedToken(String, Duration)GrantTypeconfig - OAuth client config for the given tokentoken - original tokenmargin - max lifetime of the token that should be refreshedTokenServiceExceptionGrantType@Deprecated boolean isRefreshNeeded(ClientToken token, Duration margin)
TokenHandler.getRefreshedToken(String, Duration)token with no refresh token, this method will always return false.token - original tokenmargin - max lifetime of the token that should be refreshedCopyright © 2020–2024 Atlassian. All rights reserved.