net.adamcin.httpsig.api
Enum VerifyResult

java.lang.Object
  extended by java.lang.Enum<VerifyResult>
      extended by net.adamcin.httpsig.api.VerifyResult
All Implemented Interfaces:
Serializable, Comparable<VerifyResult>

public enum VerifyResult
extends Enum<VerifyResult>

Enumeration of possible results from Verifier.verifyWithResult(Challenge, RequestContent, Authorization)


Enum Constant Summary
CHALLENGE_NOT_SATISFIED
          Authorization does not declare all the headers required by the Challenge
EXPIRED_DATE_HEADER
          The value of the date header falls outside of the current time of the Verifier, plus or minus the skew
FAILED_KEY_VERIFY
          The selected Key rejected the signature as invalid
INCOMPLETE_REQUEST
          Not all headers identified by the Authorization are present in the RequestContent
KEY_NOT_FOUND
          The Verifier cannot find a Key matching the keyId of the Authorization
SUCCESS
          Signature is valid
 
Method Summary
static VerifyResult valueOf(String name)
          Returns the enum constant of this type with the specified name.
static VerifyResult[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SUCCESS

public static final VerifyResult SUCCESS
Signature is valid


CHALLENGE_NOT_SATISFIED

public static final VerifyResult CHALLENGE_NOT_SATISFIED
Authorization does not declare all the headers required by the Challenge


INCOMPLETE_REQUEST

public static final VerifyResult INCOMPLETE_REQUEST
Not all headers identified by the Authorization are present in the RequestContent


EXPIRED_DATE_HEADER

public static final VerifyResult EXPIRED_DATE_HEADER
The value of the date header falls outside of the current time of the Verifier, plus or minus the skew


KEY_NOT_FOUND

public static final VerifyResult KEY_NOT_FOUND
The Verifier cannot find a Key matching the keyId of the Authorization


FAILED_KEY_VERIFY

public static final VerifyResult FAILED_KEY_VERIFY
The selected Key rejected the signature as invalid

Method Detail

values

public static VerifyResult[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (VerifyResult c : VerifyResult.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static VerifyResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013-2014. All Rights Reserved.