Package io.deephaven.dhservice.client
Interface AuthenticatedService
- All Known Subinterfaces:
UnifiedService
- All Known Implementing Classes:
AuthenticatedService.DefaultImpl,ConfigurationServiceGrpcImpl,DataRoutingServiceGrpcImpl,EnvoyDiscoverySupportServiceGrpcImpl,SchemaServiceGrpcImpl,ServiceRegistryServiceGrpcImpl,UnifiedServiceGrpcImpl
public interface AuthenticatedService
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classProvide some common implementation for the authentication methods. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAttempt default authentication if this is not already authenticated.booleanauthenticate(@NotNull String keyFile) Authenticate, or re-authenticate using the given private key file.default booleanauthenticate(@NotNull String user, @NotNull String password) Authenticate, or re-authenticate using the given credentials.booleanauthenticate(@NotNull String user, @NotNull String password, @Nullable String operateAsUser) Authenticate, or re-authenticate using the given credentials.booleansetTokenFactoryFactory(@Nullable TokenFactoryFactory tokenAuthenticationManager) Set the authentication client manager to use for token generation.
-
Method Details
-
authenticate
boolean authenticate()Attempt default authentication if this is not already authenticated.- Returns:
- true if authentication succeeded, else false
-
authenticate
Authenticate, or re-authenticate using the given private key file.- Returns:
- true if authentication succeeded, else false
-
authenticate
boolean authenticate(@NotNull @NotNull String user, @NotNull @NotNull String password, @Nullable @Nullable String operateAsUser) Authenticate, or re-authenticate using the given credentials.- Parameters:
user- user to authenticatepassword- password for authenticationoperateAsUser- optional operate-as user- Returns:
- true if authentication succeeded, else false
-
authenticate
Authenticate, or re-authenticate using the given credentials.- Parameters:
user- user to authenticatepassword- password for authentication- Returns:
- true if authentication succeeded, else false
-
setTokenFactoryFactory
Set the authentication client manager to use for token generation. If tokenAuthenticationManager is null or is not already authenticated, this call will de-authenticate the connection.- Parameters:
tokenAuthenticationManager- the authentication client manager to be used for future calls.- Returns:
- true if authentication succeeded, else false
-
getAuthenticatedUser
UserContext getAuthenticatedUser()
-