Class Base64MD5PasswordFilePrincipalDatabase
- java.lang.Object
-
- org.apache.qpid.server.security.auth.database.AbstractPasswordFilePrincipalDatabase<HashedUser>
-
- org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase
-
- All Implemented Interfaces:
PrincipalDatabase
public class Base64MD5PasswordFilePrincipalDatabase extends AbstractPasswordFilePrincipalDatabase<HashedUser>
Represents a user database where the account information is stored in a simple flat file. The file is expected to be in the form: username:password username1:password1 ... usernamen:passwordn where a carriage return separates each username/password pair. Passwords are assumed to be in plain text.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.server.security.auth.database.AbstractPasswordFilePrincipalDatabase
DEFAULT_ENCODING
-
-
Constructor Summary
Constructors Constructor Description Base64MD5PasswordFilePrincipalDatabase(PasswordCredentialManagingAuthenticationProvider<?> authenticationProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaslNegotiator
createSaslNegotiator(java.lang.String mechanism, SaslSettings saslSettings)
protected HashedUser
createUserFromFileData(java.lang.String[] result)
protected HashedUser
createUserFromPassword(java.security.Principal principal, char[] passwd)
protected org.slf4j.Logger
getLogger()
java.util.List<java.lang.String>
getMechanisms()
Get the list of mechanisms supported for use with the PrincipalDatabaseboolean
verifyPassword(java.lang.String principal, char[] password)
Used to verify that the presented Password is correct.-
Methods inherited from class org.apache.qpid.server.security.auth.database.AbstractPasswordFilePrincipalDatabase
compareCharArray, createPrincipal, deletePrincipal, getAuthenticationProvider, getPasswordSource, getUser, getUsers, lookupPassword, open, reload, savePasswordFile, setPassword, updatePassword
-
-
-
-
Constructor Detail
-
Base64MD5PasswordFilePrincipalDatabase
public Base64MD5PasswordFilePrincipalDatabase(PasswordCredentialManagingAuthenticationProvider<?> authenticationProvider)
-
-
Method Detail
-
verifyPassword
public boolean verifyPassword(java.lang.String principal, char[] password) throws javax.security.auth.login.AccountNotFoundException
Used to verify that the presented Password is correct. Currently only used by Management Console- Parameters:
principal
- The principal to authenticatepassword
- The password to check- Returns:
- true if password is correct
- Throws:
javax.security.auth.login.AccountNotFoundException
- if the principal cannot be found
-
createUserFromPassword
protected HashedUser createUserFromPassword(java.security.Principal principal, char[] passwd)
- Specified by:
createUserFromPassword
in classAbstractPasswordFilePrincipalDatabase<HashedUser>
-
createUserFromFileData
protected HashedUser createUserFromFileData(java.lang.String[] result)
- Specified by:
createUserFromFileData
in classAbstractPasswordFilePrincipalDatabase<HashedUser>
-
getLogger
protected org.slf4j.Logger getLogger()
- Specified by:
getLogger
in classAbstractPasswordFilePrincipalDatabase<HashedUser>
-
getMechanisms
public java.util.List<java.lang.String> getMechanisms()
Description copied from interface:PrincipalDatabase
Get the list of mechanisms supported for use with the PrincipalDatabase- Returns:
- space separated list of supported Sasl mechanisms
-
createSaslNegotiator
public SaslNegotiator createSaslNegotiator(java.lang.String mechanism, SaslSettings saslSettings)
-
-