|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.adamcin.httpsig.api.DefaultVerifier
public final class DefaultVerifier
The Server-Side component of the protocol which verifies Authorization headers using SSH Public Keys
| Field Summary | |
|---|---|
static long |
DEFAULT_SKEW
|
| Constructor Summary | |
|---|---|
DefaultVerifier(Keychain keychain)
|
|
DefaultVerifier(Keychain keychain,
KeyId keyId)
|
|
DefaultVerifier(Keychain keychain,
KeyId keyId,
long skew)
|
|
| Method Summary | |
|---|---|
Keychain |
getKeychain()
|
long |
getSkew()
|
Key |
selectKey(Authorization authorization)
Selects an appropriate Key from the Keychain matching the keyId specified in the
Authorization. |
void |
setSkew(long skew)
Deprecated. will remove to make the class immutable. use constructor overload instead. |
boolean |
verify(Challenge challenge,
RequestContent requestContent,
Authorization authorization)
Verifies the provided Authorization header against the original Challenge |
VerifyResult |
verifyWithResult(Challenge challenge,
RequestContent requestContent,
Authorization authorization)
Verifies the provided Authorization header against the original Challenge |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long DEFAULT_SKEW
| Constructor Detail |
|---|
public DefaultVerifier(Keychain keychain)
public DefaultVerifier(Keychain keychain,
KeyId keyId)
public DefaultVerifier(Keychain keychain,
KeyId keyId,
long skew)
| Method Detail |
|---|
public Keychain getKeychain()
public long getSkew()
getSkew in interface Verifierpublic void setSkew(long skew)
skew - new server skew in millisecondspublic Key selectKey(Authorization authorization)
Key from the Keychain matching the keyId specified in the
Authorization. This method is called by
Verifier.verifyWithResult(Challenge, RequestContent, Authorization), but can be called by client code to
retrieve the identified Key directly
selectKey in interface Verifierauthorization - the Authorization header
Key or null
public boolean verify(Challenge challenge,
RequestContent requestContent,
Authorization authorization)
Authorization header against the original Challenge
verify in interface Verifierchallenge - the WWW-Authenticate challenge sent to the client in the previous responserequestContent - the RequestContent containing the request header contentauthorization - the Authorization header to verify
VerifyResult.SUCCESS), false otherwise
public VerifyResult verifyWithResult(Challenge challenge,
RequestContent requestContent,
Authorization authorization)
Authorization header against the original Challenge
verifyWithResult in interface Verifierchallenge - the WWW-Authenticate challenge sent to the client in the previous responserequestContent - the RequestContent containing the request header contentauthorization - the Authorization header to verify
VerifyResult
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||