Class DheAuthenticationHandler
java.lang.Object
io.deephaven.enterprise.dnd.authentication.DheAuthenticationHandler
- All Implemented Interfaces:
AuthenticationRequestHandler
The authentication hook for enterprise clients to DnD workers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.auth.AuthenticationRequestHandler
AuthenticationRequestHandler.HandshakeResponseListener, AuthenticationRequestHandler.MetadataResponseListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable DheAuthContextFetch an EnterpriseDheAuthContextfrom the currentExecutionContext.static UserContextvoidinitialize(@NotNull String targetUrl) static booleanisAdmin(@NotNull UserContext userContext) Check if the specified user is an administrator of this worker.static booleanisViewer(@NotNull UserContext userContext) Check if the specified user is a viewer of this worker.login(long protocolVersionUnused, ByteBuffer payload, AuthenticationRequestHandler.HandshakeResponseListener listenerUnused) login(String payload, AuthenticationRequestHandler.MetadataResponseListener listener) static voidsetAdminGroups(@NotNull Set<String> adminGroups) static voidsetAuthClient(AuthenticationClient authClient) static voidsetGroupProvider(@NotNull GroupProvider groupProvider) static voidsetOwnerCredentials(@NotNull UserContext userContext) static voidsetProcessInfoId(@NotNull String processInfoId) static voidsetViewerGroups(@NotNull Set<String> viewerGroups) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.auth.AuthenticationRequestHandler
urls
-
Constructor Details
-
DheAuthenticationHandler
public DheAuthenticationHandler()Create a new auth handler.
-
-
Method Details
-
setOwnerCredentials
-
getOwnerCredentials
-
setAdminGroups
-
setViewerGroups
-
setGroupProvider
-
setProcessInfoId
-
isAdmin
Check if the specified user is an administrator of this worker.- Parameters:
userContext- the user- Returns:
- true if the user is an administrator.
-
isViewer
Check if the specified user is a viewer of this worker.- Parameters:
userContext- the user- Returns:
- true if the user is a viewer
-
fetchDheAuthContext
Fetch an EnterpriseDheAuthContextfrom the currentExecutionContext. If one is not provided, or of the wrong type, returnnull.- Returns:
- the current
DheAuthContextor null of one was not present.
-
setAuthClient
-
getAuthType
- Specified by:
getAuthTypein interfaceAuthenticationRequestHandler
-
login
public Optional<AuthContext> login(long protocolVersionUnused, ByteBuffer payload, AuthenticationRequestHandler.HandshakeResponseListener listenerUnused) throws AuthenticationException - Specified by:
loginin interfaceAuthenticationRequestHandler- Throws:
AuthenticationException
-
login
public Optional<AuthContext> login(String payload, AuthenticationRequestHandler.MetadataResponseListener listener) throws AuthenticationException - Specified by:
loginin interfaceAuthenticationRequestHandler- Throws:
AuthenticationException
-
initialize
- Specified by:
initializein interfaceAuthenticationRequestHandler
-