Class PlainCredentialsProvider
java.lang.Object
org.apache.drill.common.logical.security.PlainCredentialsProvider
- All Implemented Interfaces:
CredentialsProvider
Implementation of
CredentialsProvider
that holds credentials provided by user.
Its constructor accepts a map with credential names as keys and values as corresponding credential values.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns map with authentication credentials.getUserCredentials
(String queryUser) Returns the credentials for a given query user.int
hashCode()
void
setUserCredentials
(String username, String password, String queryUser) toString()
-
Field Details
-
EMPTY_CREDENTIALS_PROVIDER
-
-
Constructor Details
-
PlainCredentialsProvider
-
PlainCredentialsProvider
-
PlainCredentialsProvider
-
-
Method Details
-
getCredentials
Description copied from interface:CredentialsProvider
Returns map with authentication credentials. Key is the credential name, for example"username"
and map value is corresponding credential value.- Specified by:
getCredentials
in interfaceCredentialsProvider
-
getUserCredentials
-
getUserCredentials
Returns the credentials for a given query user. If that user does not have credentials, the function will add an entry for that user with keys username, password which are both null.- Specified by:
getUserCredentials
in interfaceCredentialsProvider
- Parameters:
queryUser
- A String of the currently logged in user- Returns:
- A Map of the active user's credentials
-
setUserCredentials
- Specified by:
setUserCredentials
in interfaceCredentialsProvider
-
equals
-
hashCode
public int hashCode() -
toString
-