public class AccessTokenManager extends Object
| Modifier and Type | Method and Description |
|---|---|
AccessTokens |
getUpdatedTokens(Supplier<String> coreServicesTokenProvider,
Function<String,String> platformTokenProvider) |
void |
reset() |
void |
resetIfEquals(String accessTokenInUse)
Invalidate the current value of the token if the token has still the value accesTokenInUse.
|
public AccessTokens getUpdatedTokens(Supplier<String> coreServicesTokenProvider, Function<String,String> platformTokenProvider)
coreServicesTokenProvider - a supplier for the core services token, it will only be called if necessary.platformTokenProvider - a function that receives the core services token and obtains the platform token from exchange,
it will only be called if necessary.public void reset()
public void resetIfEquals(String accessTokenInUse)
accessTokenInUse - the value that the core services token must have to invalidate this token.Copyright © 2014–2022 MuleSoft, Inc.. All rights reserved.