From 3eddded2f3c65dfccfc1e86c844b3f8762fbb3ae Mon Sep 17 00:00:00 2001 From: Jamie Stackhouse Date: Fri, 17 Jul 2015 16:40:52 -0300 Subject: [PATCH] Adding additional bits to mask for various validation errors. --- errors.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/errors.go b/errors.go index 8e956a8..b055f3b 100644 --- a/errors.go +++ b/errors.go @@ -16,10 +16,15 @@ const ( ValidationErrorMalformed uint32 = 1 << iota // Token is malformed ValidationErrorUnverifiable // Token could not be verified because of signing problems ValidationErrorSignatureInvalid // Signature validation failed - ValidationErrorExpired // Exp validation failed - ValidationErrorNotValidYet // NBF validation failed - ValidationErrorIssuedAt // IAT validation failed - ValidationErrorClaimsInvalid // Generic claims validation error + + // Standard Claim validation errors + ValidationErrorAudience // AUD validation failed + ValidationErrorExpired // EXP validation failed + ValidationErrorIssuedAt // IAT validation failed + ValidationErrorIssuer // ISS validation failed + ValidationErrorNotValidYet // NBF validation failed + ValidationErrorId // JTI validation failed + ValidationErrorClaimsInvalid // Generic claims validation error ) // The error from Parse if token is not valid