Class OPPSTokenManager
java.lang.Object
com.sap.retail.sapppspricing.token.manager.OPPSTokenManager
Class to fetch token and will store it in an attribute
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethod to return token.de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel>Method to refresh token when the token is expiredvoidsetAccessToken(String accessToken) voidsetDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> destinationService)
-
Constructor Details
-
OPPSTokenManager
public OPPSTokenManager()
-
-
Method Details
-
getDestinationService
public de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> getDestinationService()- Returns:
- the destinationService
-
setDestinationService
public void setDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService<ConsumedDestinationModel> destinationService) - Parameters:
destinationService- the destinationService to set
-
fetchAccessToken
Method to return token. If the token is not available, it will generate a new one.- Returns:
- access token
-
setAccessToken
-
refreshToken
Method to refresh token when the token is expired- Returns:
- access token
-