net.adamcin.httpsig.api
Interface Verifier

All Known Implementing Classes:
DefaultVerifier

public interface Verifier

Limited interface allowing for server-side use of guards and remote service calls

Since:
1.0.8

Method Summary
 long getSkew()
           
 Key selectKey(Authorization authorization)
          Selects an appropriate Key from the Keychain matching the keyId specified in the Authorization.
 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
 

Method Detail

getSkew

long getSkew()
Returns:
server skew in milliseconds

selectKey

Key selectKey(Authorization authorization)
Selects an appropriate Key from the Keychain matching the keyId specified in the Authorization. This method is called by verifyWithResult(Challenge, RequestContent, Authorization), but can be called by client code to retrieve the identified Key directly

Parameters:
authorization - the Authorization header
Returns:
a matching Key or null
Since:
1.0.6

verify

boolean verify(Challenge challenge,
               RequestContent requestContent,
               Authorization authorization)
Verifies the provided Authorization header against the original Challenge

Parameters:
challenge - the WWW-Authenticate challenge sent to the client in the previous response
requestContent - the RequestContent containing the request header content
authorization - the Authorization header to verify
Returns:
true if valid (VerifyResult.SUCCESS), false otherwise

verifyWithResult

VerifyResult verifyWithResult(Challenge challenge,
                              RequestContent requestContent,
                              Authorization authorization)
Verifies the provided Authorization header against the original Challenge

Parameters:
challenge - the WWW-Authenticate challenge sent to the client in the previous response
requestContent - the RequestContent containing the request header content
authorization - the Authorization header to verify
Returns:
a VerifyResult


Copyright © 2013-2014. All Rights Reserved.