Class AuthenticatedService.DefaultImpl

java.lang.Object
io.deephaven.dhservice.client.AuthenticatedService.DefaultImpl
All Implemented Interfaces:
AuthenticatedService
Direct Known Subclasses:
UnifiedServiceGrpcImpl
Enclosing interface:
AuthenticatedService

public abstract static class AuthenticatedService.DefaultImpl extends Object implements AuthenticatedService
Provide some common implementation for the authentication methods.
  • Constructor Details

    • DefaultImpl

      public DefaultImpl()
  • Method Details

    • getLog

      @NotNull protected abstract @NotNull com.fishlib.io.logger.Logger getLog()
      Get a Logger from the implementation (which probably has one)
      Returns:
      a Logger
    • getTokenFactoryFactory

      @Nullable protected abstract @Nullable TokenFactoryFactory getTokenFactoryFactory()
      Get the current TokenFactoryFactory from the implementation, for use in the authenticate method implementations
      Returns:
      the current auth client manager, may be null
    • authenticate

      public boolean authenticate()
      Description copied from interface: AuthenticatedService
      Attempt default authentication if this is not already authenticated.
      Specified by:
      authenticate in interface AuthenticatedService
      Returns:
      true if authentication succeeded, else false
    • authenticate

      public boolean authenticate(@NotNull @NotNull String keyFile)
      Description copied from interface: AuthenticatedService
      Authenticate, or re-authenticate using the given private key file.
      Specified by:
      authenticate in interface AuthenticatedService
      Returns:
      true if authentication succeeded, else false
    • authenticate

      public boolean authenticate(@NotNull @NotNull String user, @NotNull @NotNull String password, @Nullable @Nullable String operateAsUser)
      Description copied from interface: AuthenticatedService
      Authenticate, or re-authenticate using the given credentials.
      Specified by:
      authenticate in interface AuthenticatedService
      Parameters:
      user - user to authenticate
      password - password for authentication
      operateAsUser - optional operate-as user
      Returns:
      true if authentication succeeded, else false
    • getAuthenticatedUser

      public UserContext getAuthenticatedUser()
      Specified by:
      getAuthenticatedUser in interface AuthenticatedService