org.apache.jackrabbit.core.security.authentication
Class CryptedSimpleCredentials
java.lang.Object
org.apache.jackrabbit.core.security.authentication.CryptedSimpleCredentials
- All Implemented Interfaces:
- Serializable, Credentials
public class CryptedSimpleCredentials
- extends Object
- implements Credentials
Crypted variant of the SimpleCredentials
.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CryptedSimpleCredentials
public CryptedSimpleCredentials(SimpleCredentials credentials)
throws NoSuchAlgorithmException,
UnsupportedEncodingException
- Take
SimpleCredentials
and
digest the password if it is plain-text
- Parameters:
credentials
-
- Throws:
NoSuchAlgorithmException
UnsupportedEncodingException
CryptedSimpleCredentials
public CryptedSimpleCredentials(String userId,
String password)
throws NoSuchAlgorithmException,
UnsupportedEncodingException
- Throws:
NoSuchAlgorithmException
UnsupportedEncodingException
getUserID
public String getUserID()
getAttribute
public Object getAttribute(String name)
getAttributeNames
public String[] getAttributeNames()
getAlgorithm
public String getAlgorithm()
getPassword
public String getPassword()
matches
public boolean matches(SimpleCredentials credentials)
throws NoSuchAlgorithmException,
UnsupportedEncodingException
- Compair this instance with an instance of SimpleCredentials.
If one the other Credentials' Password is plain-text treies to encode
it with the current Digest.
- Parameters:
credentials
-
- Returns:
- true if
UserID
and
Password
match.
- Throws:
NoSuchAlgorithmException
UnsupportedEncodingException
Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.