org.apache.jackrabbit.core.security.authentication
Class CryptedSimpleCredentials

java.lang.Object
  extended by 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

Constructor Summary
CryptedSimpleCredentials(SimpleCredentials credentials)
          Take SimpleCredentials and digest the password if it is plain-text
CryptedSimpleCredentials(String userId, String password)
           
 
Method Summary
 String getAlgorithm()
           
 Object getAttribute(String name)
           
 String[] getAttributeNames()
           
 String getPassword()
           
 String getUserID()
           
 boolean matches(SimpleCredentials credentials)
          Compair this instance with an instance of SimpleCredentials.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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.