|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.security.authentication.CryptedSimpleCredentials
public class CryptedSimpleCredentials
Crypted variant of the SimpleCredentials
.
Constructor Summary | |
---|---|
CryptedSimpleCredentials(SimpleCredentials credentials)
Build a new instance of CryptedSimpleCredentials from the
given SimpleCredentials and create
the crypted password field using the default digest . |
|
CryptedSimpleCredentials(String userId,
String cryptedPassword)
Create a new instanceof CryptedSimpleCredentials from the
given userId and cryptedPassword strings. |
Method Summary | |
---|---|
String |
getAlgorithm()
|
Object |
getAttribute(String name)
|
String[] |
getAttributeNames()
|
String |
getPassword()
|
String |
getUserID()
|
boolean |
matches(SimpleCredentials credentials)
Compares this instance with the given SimpleCredentials and
returns true if both match. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CryptedSimpleCredentials(SimpleCredentials credentials) throws NoSuchAlgorithmException, UnsupportedEncodingException
CryptedSimpleCredentials
from the
given SimpleCredentials
and create
the crypted password field using the default digest
.
credentials
-
NoSuchAlgorithmException
UnsupportedEncodingException
public CryptedSimpleCredentials(String userId, String cryptedPassword) throws NoSuchAlgorithmException, UnsupportedEncodingException
CryptedSimpleCredentials
from the
given userId
and cryptedPassword
strings.
In contrast to CryptedSimpleCredentials(SimpleCredentials)
that
expects the password to be plain text this constructor expects the
password to be already crypted. However, it performs a simple validation
and calls Text.digest(String, byte[])
using the
default digest
in case the
given password is found to be plain text.
userId
- cryptedPassword
-
NoSuchAlgorithmException
UnsupportedEncodingException
Method Detail |
---|
public String getUserID()
public Object getAttribute(String name)
public String[] getAttributeNames()
public String getAlgorithm()
public String getPassword()
public boolean matches(SimpleCredentials credentials) throws NoSuchAlgorithmException, UnsupportedEncodingException
SimpleCredentials
and
returns true
if both match. Successful match is defined to
be the result of
credentials
- An instance of simple credentials.
UserID
and
Password
match.
NoSuchAlgorithmException
UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |