Package io.deephaven.authentication.psk
Class PskAuthenticationHandler
java.lang.Object
io.deephaven.authentication.psk.PskAuthenticationHandler
- All Implemented Interfaces:
io.deephaven.auth.AuthenticationRequestHandler
public class PskAuthenticationHandler
extends Object
implements io.deephaven.auth.AuthenticationRequestHandler
On startup, check if a PSK was set by config, otherwise generate a new one and log it. Any user with the pre-shared
key will be identified as a superuser.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.auth.AuthenticationRequestHandler
io.deephaven.auth.AuthenticationRequestHandler.HandshakeResponseListener, io.deephaven.auth.AuthenticationRequestHandler.MetadataResponseListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(String targetUrl) Optional<io.deephaven.auth.AuthContext>login(long protocolVersion, ByteBuffer payload, io.deephaven.auth.AuthenticationRequestHandler.HandshakeResponseListener listener) Optional<io.deephaven.auth.AuthContext>login(String payload, io.deephaven.auth.AuthenticationRequestHandler.MetadataResponseListener listener) Provide a list of URLs that the user can visit to authenticate.
-
Constructor Details
-
PskAuthenticationHandler
public PskAuthenticationHandler()
-
-
Method Details
-
getAuthType
- Specified by:
getAuthTypein interfaceio.deephaven.auth.AuthenticationRequestHandler
-
login
public Optional<io.deephaven.auth.AuthContext> login(long protocolVersion, ByteBuffer payload, io.deephaven.auth.AuthenticationRequestHandler.HandshakeResponseListener listener) throws io.deephaven.auth.AuthenticationException - Specified by:
loginin interfaceio.deephaven.auth.AuthenticationRequestHandler- Throws:
io.deephaven.auth.AuthenticationException
-
login
public Optional<io.deephaven.auth.AuthContext> login(String payload, io.deephaven.auth.AuthenticationRequestHandler.MetadataResponseListener listener) throws io.deephaven.auth.AuthenticationException - Specified by:
loginin interfaceio.deephaven.auth.AuthenticationRequestHandler- Throws:
io.deephaven.auth.AuthenticationException
-
initialize
- Specified by:
initializein interfaceio.deephaven.auth.AuthenticationRequestHandler
-
urls
Provide a list of URLs that the user can visit to authenticate. Adds the `psk` query parameter to the target URL.- Specified by:
urlsin interfaceio.deephaven.auth.AuthenticationRequestHandler- Parameters:
targetUrl- the base url of the hosted UI- Returns:
- The targetUrl with the PSK query parameter appended
-