Package com.cyberark.conjur.api.clients
Class AuthnTokenClient
- java.lang.Object
-
- com.cyberark.conjur.api.clients.AuthnTokenClient
-
- All Implemented Interfaces:
AuthnProvider
public class AuthnTokenClient extends Object implements AuthnProvider
-
-
Constructor Summary
Constructors Constructor Description AuthnTokenClient(Token token)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tokenauthenticate()Return an authentication token.Tokenauthenticate(boolean useCachedToken)Return an authentication token.
-
-
-
Constructor Detail
-
AuthnTokenClient
public AuthnTokenClient(Token token)
-
-
Method Detail
-
authenticate
public Token authenticate()
Description copied from interface:AuthnProviderReturn an authentication token. This method should be equivalent toauthenticate(true)if the implementation supports token caching.- Specified by:
authenticatein interfaceAuthnProvider- Returns:
- a Conjur authentication token
-
authenticate
public Token authenticate(boolean useCachedToken)
Description copied from interface:AuthnProviderReturn an authentication token. If the implementation supports token caching and useCachedToken is true, it should return a cached token if a valid (non-expired) one is available. If useCachedToken is false, it should always fetch a fresh token from the Conjur authn service.- Specified by:
authenticatein interfaceAuthnProvider- Parameters:
useCachedToken- whether to use a cached token.- Returns:
- a Conjur authentication token
-
-