Package io.deephaven.enterprise.auth
Interface AuthenticationClient
- All Superinterfaces:
PublicKeyAuthenticationClient
,TokenAuthenticationClient
,TokenFactoryFactory
,TokenVerificationClient
- All Known Implementing Classes:
AuthenticationClientManager
,AuthenticationClientManager.Null
,GrpcAuthenticationClientManager
Auth client API, common to both local-only and remote clients.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.enterprise.auth.TokenFactoryFactory
TokenFactoryFactory.TokenFactory
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Disconnect from the originexternalLogin
(String key) Attempt to authenticate against an auth-module for an as-yet-unknown user based on the provided key.default boolean
passwordAuthentication
(String userToAuthenticate, String password) Authenticate the specified userboolean
passwordAuthentication
(String userToAuthenticate, String password, String effectiveUser) Authenticate the specified user as a different effective userboolean
presentDelegateToken
(AuthToken token) Authenticate using the specified delegate tokenMethods inherited from interface io.deephaven.enterprise.auth.PublicKeyAuthenticationClient
challengeResponse
Methods inherited from interface io.deephaven.enterprise.auth.TokenAuthenticationClient
createToken, createToken, createTokenForUser, createTokenForUser
Methods inherited from interface io.deephaven.enterprise.auth.TokenFactoryFactory
getTokenFactory, getTokenFactory, getTokenFactory, getTokenFactory
Methods inherited from interface io.deephaven.enterprise.auth.TokenVerificationClient
verifyToken
-
Method Details
-
close
void close()Disconnect from the origin- Specified by:
close
in interfaceTokenFactoryFactory
-
passwordAuthentication
Authenticate the specified user- Parameters:
userToAuthenticate
- The user to authenticatepassword
- The password- Returns:
- true on success, false on failure
- Throws:
UncheckedIOException
- if the client can not communicate with the Auth serverAuthException
- if any other problem occurred
-
passwordAuthentication
Authenticate the specified user as a different effective user- Parameters:
userToAuthenticate
- The user to authenticatepassword
- The passwordeffectiveUser
- The effective user to operate as- Returns:
- true on success, false on failure
- Throws:
UncheckedIOException
- if the client can not communicate with the Auth serverAuthException
- if any other problem occurred
-
presentDelegateToken
Authenticate using the specified delegate token- Parameters:
token
- The delegate token created by AuthenticationClientManager.createDelegateTokens()- Throws:
UncheckedIOException
- if the server was unreachableAuthException
- if any other problem occurred
-
externalLogin
Attempt to authenticate against an auth-module for an as-yet-unknown user based on the provided key. On successful key-based authentication, the user-name shall be provided by the auth-module. This method will block until the authentication-attempt succeeds or fails, or is timed-out by the auth-module waiting for the external authentication message- Parameters:
key
- a nonce which an appropriate auth-module may be able to confirm as authenticated- Returns:
- the authenticated user-name if this key is approved by an auth-module, else null
- Throws:
UncheckedIOException
- if the server was unreachableAuthException
- if any other problem occurred
-