|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Restlet
org.restlet.routing.Filter
org.restlet.security.Authenticator
org.restlet.security.ChallengeAuthenticator
org.restlet.ext.crypto.DigestAuthenticator
public class DigestAuthenticator
Authenticator supporting the digest challenge authentication schemes. By
default, it only knows about the ChallengeScheme.HTTP_DIGEST scheme.
DigestVerifier,
DigestAuthenticator| Field Summary |
|---|
| Fields inherited from class org.restlet.routing.Filter |
|---|
CONTINUE, SKIP, STOP |
| Constructor Summary | |
|---|---|
DigestAuthenticator(Context context,
boolean optional,
String realm,
List<Reference> domainRefs,
String serverKey)
Constructor. |
|
DigestAuthenticator(Context context,
String realm,
String serverKey)
Constructor. |
|
| Method Summary | |
|---|---|
protected ChallengeRequest |
createChallengeRequest(boolean stale)
|
String |
generateServerNonce()
Generates a server nonce. |
List<Reference> |
getDomainRefs()
Returns the base URI references that collectively define the protected domains for the digest authentication. |
String |
getHashedSecret(String identifier,
char[] secret)
Return the hashed secret. |
long |
getMaxServerNonceAge()
Returns the number of milliseconds between each mandatory nonce refresh. |
String |
getServerKey()
Returns the secret key known only by server. |
DigestVerifier<LocalVerifier> |
getVerifier()
|
void |
setDomainRefs(List<Reference> domainRefs)
Sets the URI references that define the protection domains for the digest authentication. |
void |
setMaxServerNonceAge(long maxServerNonceAge)
Sets the number of milliseconds between each mandatory nonce refresh. |
void |
setServerKey(String serverKey)
Sets the secret key known only by server. |
void |
setVerifier(Verifier verifier)
Set the internal verifier. |
void |
setWrappedAlgorithm(String wrappedAlgorithm)
Sets the digest algorithm of secrets returned by the wrapped verifier. |
void |
setWrappedVerifier(LocalVerifier localVerifier)
Sets the secret verifier that will be wrapped by real verifier supporting all the HTTP DIGEST verifications (nonce, domain URIs, etc.). |
| Methods inherited from class org.restlet.security.ChallengeAuthenticator |
|---|
authenticate, challenge, forbid, getRealm, getScheme, isRechallenging, setRealm, setRechallenging |
| Methods inherited from class org.restlet.security.Authenticator |
|---|
authenticated, beforeHandle, getEnroler, isMultiAuthenticating, isOptional, setEnroler, setMultiAuthenticating, setOptional, unauthenticated |
| Methods inherited from class org.restlet.routing.Filter |
|---|
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stop |
| Methods inherited from class org.restlet.Restlet |
|---|
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DigestAuthenticator(Context context,
boolean optional,
String realm,
List<Reference> domainRefs,
String serverKey)
ChallengeScheme.HTTP_DIGEST and the nonce lifespan to 5 minutes
by default.
context - The context.optional - Indicates if the authentication success is optional.realm - The authentication realm.domainRefs - The URI references that define the protection domains.serverKey - The secret key known only to server.
public DigestAuthenticator(Context context,
String realm,
String serverKey)
context - The context.realm - The authentication realm.serverKey - secret key known only to server| Method Detail |
|---|
protected ChallengeRequest createChallengeRequest(boolean stale)
createChallengeRequest in class ChallengeAuthenticatorpublic String generateServerNonce()
public List<Reference> getDomainRefs()
public String getHashedSecret(String identifier,
char[] secret)
identifier - The user identifier to hash.secret - The user secret.
public long getMaxServerNonceAge()
public String getServerKey()
public DigestVerifier<LocalVerifier> getVerifier()
getVerifier in class ChallengeAuthenticatorpublic void setDomainRefs(List<Reference> domainRefs)
domainRefs - The base URI references.public void setMaxServerNonceAge(long maxServerNonceAge)
maxServerNonceAge - The nonce lifespan in milliseconds.public void setServerKey(String serverKey)
serverKey - The server secret key.public void setVerifier(Verifier verifier)
setWrappedVerifier(LocalVerifier) method.
setVerifier in class ChallengeAuthenticatorverifier - The internal verifier.public void setWrappedAlgorithm(String wrappedAlgorithm)
wrappedAlgorithm - The digest algorithm of secrets returned by the wrapped
verifier.Digestpublic void setWrappedVerifier(LocalVerifier localVerifier)
localVerifier - The local verifier to wrap.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||