Class TokenFetcher
- java.lang.Object
-
- com.netflix.genie.client.security.oauth2.TokenFetcher
-
public class TokenFetcher extends java.lang.Object
Class that contains the logic to get OAuth credentials from IDP.- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description TokenFetcher(java.lang.String oauthUrl, java.lang.String clientId, java.lang.String clientSecret, java.lang.String grantType, java.lang.String scope)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessToken
getToken()
Method that returns the OAuth credentials.
-
-
-
Constructor Detail
-
TokenFetcher
public TokenFetcher(java.lang.String oauthUrl, java.lang.String clientId, java.lang.String clientSecret, java.lang.String grantType, java.lang.String scope) throws GenieClientException
Constructor.- Parameters:
oauthUrl
- The url of the IDP from where to get the credentials.clientId
- The clientId to use to get the credentials.clientSecret
- The clientSecret to use to get the credentials.grantType
- The type of the grant.scope
- The scope of the credentials returned.- Throws:
GenieClientException
- If there is any problem.
-
-
Method Detail
-
getToken
public AccessToken getToken() throws GenieClientException
Method that returns the OAuth credentials.- Returns:
- An access token object.
- Throws:
GenieClientException
- If there is any problem.
-
-