public final class DefaultVerifier extends Object implements Verifier
Authorization
headers using SSH Public KeysModifier and Type | Field and Description |
---|---|
static long |
DEFAULT_SKEW |
Constructor and Description |
---|
DefaultVerifier(Keychain keychain) |
DefaultVerifier(Keychain keychain,
KeyId keyId) |
DefaultVerifier(Keychain keychain,
KeyId keyId,
long skew) |
Modifier and Type | Method and Description |
---|---|
Keychain |
getKeychain() |
long |
getSkew() |
Key |
selectKey(Authorization 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 |
public static final long DEFAULT_SKEW
public DefaultVerifier(Keychain keychain)
public Keychain getKeychain()
public long getSkew()
public 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
directlyselectKey
in interface Verifier
authorization
- the Authorization
headerKey
or nullpublic boolean verify(Challenge challenge, RequestContent requestContent, Authorization authorization)
Authorization
header against the original Challenge
verify
in interface Verifier
challenge
- the WWW-Authenticate challenge sent to the client in the previous responserequestContent
- the RequestContent
containing the request header contentauthorization
- the Authorization
header to verifyVerifyResult.SUCCESS
), false otherwisepublic VerifyResult verifyWithResult(Challenge challenge, RequestContent requestContent, Authorization authorization)
Authorization
header against the original Challenge
verifyWithResult
in interface Verifier
challenge
- the WWW-Authenticate challenge sent to the client in the previous responserequestContent
- the RequestContent
containing the request header contentauthorization
- the Authorization
header to verifyVerifyResult
Copyright © 2013-2017. All Rights Reserved.