Package com.illumon.iris.auth
Class LocalAuthenticationClientManager
java.lang.Object
io.deephaven.enterprise.auth.AuthenticationClientManagerBase
com.illumon.iris.auth.LocalAuthenticationClientManager
- All Implemented Interfaces:
PublicKeyAuthenticationClient,TokenAuthenticationClient,TokenFactoryFactory,TokenVerificationClient,AutoCloseable
public class LocalAuthenticationClientManager
extends AuthenticationClientManagerBase
implements AutoCloseable
In-process version of TokenFactoryFactory. This can be useful if/when combining services in one main, and for
testing.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.enterprise.auth.AuthenticationClientManagerBase
AuthenticationClientManagerBase.SingleClientTokenFactory, AuthenticationClientManagerBase.TokenFactoryBaseNested classes/interfaces inherited from interface io.deephaven.enterprise.auth.TokenFactoryFactory
TokenFactoryFactory.TokenFactory -
Constructor Summary
ConstructorsConstructorDescriptionLocalAuthenticationClientManager(LocalAuthenticationServer authSvr, boolean doRemoteOriginTokenVerification) -
Method Summary
Modifier and TypeMethodDescriptionbooleanchallengeResponse(String privateKeyFile) Authenticate with the user denoted in the specified private key filevoidclose()Close the token factory.createToken(String service) Create a new token for the specified servicecreateTokenForUser(String service, String operateAs) Create a new token for the specified service to operate as the specified usrgetTokenFactory(String service) Create a token factory for the provided servicegetTokenFactory(String service, String user) Create a token factory for the provided service and userbooleanverifyToken(String service, AuthToken token) Validate the specified token for the specified serviceMethods inherited from class io.deephaven.enterprise.auth.AuthenticationClientManagerBase
isRetryableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.enterprise.auth.TokenAuthenticationClient
createToken, createTokenForUserMethods inherited from interface io.deephaven.enterprise.auth.TokenFactoryFactory
getTokenFactory, getTokenFactory
-
Constructor Details
-
LocalAuthenticationClientManager
public LocalAuthenticationClientManager(LocalAuthenticationServer authSvr, boolean doRemoteOriginTokenVerification) -
LocalAuthenticationClientManager
-
-
Method Details
-
getTokenFactory
Description copied from interface:TokenFactoryFactoryCreate a token factory for the provided service- Specified by:
getTokenFactoryin interfaceTokenFactoryFactory- Parameters:
service- the service- Returns:
- the created
TokenFactory
-
getTokenFactory
Description copied from interface:TokenFactoryFactoryCreate a token factory for the provided service and user- Specified by:
getTokenFactoryin interfaceTokenFactoryFactory- Parameters:
service- the serviceuser- the user- Returns:
- the created
TokenFactory
-
challengeResponse
Description copied from interface:PublicKeyAuthenticationClientAuthenticate with the user denoted in the specified private key file- Specified by:
challengeResponsein interfacePublicKeyAuthenticationClient- Parameters:
privateKeyFile- the file containing the elements required for authentication; user, operateas, public and private keys.- Returns:
- the status of the authentication-attempt; true if successfully authenticated, else false
-
createToken
Description copied from interface:TokenAuthenticationClientCreate a new token for the specified service- Specified by:
createTokenin interfaceTokenAuthenticationClient- Returns:
- A new auth token from the server
-
verifyToken
Description copied from interface:TokenVerificationClientValidate the specified token for the specified service- Specified by:
verifyTokenin interfaceTokenVerificationClient- Returns:
- True if the token was valid, false otherwise
-
createTokenForUser
Description copied from interface:TokenAuthenticationClientCreate a new token for the specified service to operate as the specified usr- Specified by:
createTokenForUserin interfaceTokenAuthenticationClient
-
close
public void close()Description copied from interface:TokenFactoryFactoryClose the token factory.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTokenFactoryFactory
-