@@ -63,14 +63,14 @@ func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
63
63
return verifyAud ([]string {c .Audience }, cmp , req )
64
64
}
65
65
66
- // VerifyExpiresAt compares the exp claim against cmp.
67
- // If required is false, this method will return true if the value matches or is unset
66
+ // VerifyExpiresAt compares the exp claim against cmp (cmp <= exp) .
67
+ // If req is false, it will return true, if exp is unset.
68
68
func (c * StandardClaims ) VerifyExpiresAt (cmp int64 , req bool ) bool {
69
69
return verifyExp (c .ExpiresAt , cmp , req )
70
70
}
71
71
72
- // VerifyIssuedAt compares the iat claim against cmp.
73
- // If required is false, this method will return true if the value matches or is unset
72
+ // VerifyIssuedAt compares the iat claim against cmp (cmp >= iat) .
73
+ // If req is false, it will return true, if iat is unset.
74
74
func (c * StandardClaims ) VerifyIssuedAt (cmp int64 , req bool ) bool {
75
75
return verifyIat (c .IssuedAt , cmp , req )
76
76
}
@@ -81,8 +81,8 @@ func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool {
81
81
return verifyIss (c .Issuer , cmp , req )
82
82
}
83
83
84
- // VerifyNotBefore compares the nbf claim against cmp.
85
- // If required is false, this method will return true if the value matches or is unset
84
+ // VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf) .
85
+ // If req is false, it will return true, if nbf is unset.
86
86
func (c * StandardClaims ) VerifyNotBefore (cmp int64 , req bool ) bool {
87
87
return verifyNbf (c .NotBefore , cmp , req )
88
88
}
0 commit comments