Package org.bhn.promotion.iam.token
Class TokenGenerator
java.lang.Object
org.bhn.promotion.iam.token.TokenGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates the payload for the token request to the IAM service, including the client credentials.getAccessToken(String source) Retrieves an access token by making an HTTP POST request to the configured promotion token service.getTokenWithRetry(String source)
-
Constructor Details
-
TokenGenerator
public TokenGenerator()
-
-
Method Details
-
getTokenWithRetry
-
getAccessToken
Retrieves an access token by making an HTTP POST request to the configured promotion token service.- Returns:
- the access token as a
String, ornullif an error occurs.
-
createTokenRequestPayload
Creates the payload for the token request to the IAM service, including the client credentials.- Returns:
- a
MultiValueMaprepresenting the token request payload.
-