@@ -170,8 +170,8 @@ func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
170170 return verifyAud ([]string {c .Audience }, cmp , req )
171171}
172172
173- // VerifyExpiresAt compares the exp claim against cmp.
174- // If required is false, this method will return true if the value matches or is unset
173+ // VerifyExpiresAt compares the exp claim against cmp (cmp <= exp) .
174+ // If req is false, it will return true, if exp is unset.
175175func (c * StandardClaims ) VerifyExpiresAt (cmp int64 , req bool ) bool {
176176 if c .ExpiresAt == 0 {
177177 return verifyExp (nil , time .Unix (cmp , 0 ), req )
@@ -181,8 +181,8 @@ func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool {
181181 return verifyExp (& t , time .Unix (cmp , 0 ), req )
182182}
183183
184- // VerifyIssuedAt compares the iat claim against cmp.
185- // If required is false, this method will return true if the value matches or is unset
184+ // VerifyIssuedAt compares the iat claim against cmp (cmp >= iat) .
185+ // If req is false, it will return true, if iat is unset.
186186func (c * StandardClaims ) VerifyIssuedAt (cmp int64 , req bool ) bool {
187187 if c .IssuedAt == 0 {
188188 return verifyIat (nil , time .Unix (cmp , 0 ), req )
@@ -192,8 +192,8 @@ func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool {
192192 return verifyIat (& t , time .Unix (cmp , 0 ), req )
193193}
194194
195- // VerifyNotBefore compares the nbf claim against cmp.
196- // If required is false, this method will return true if the value matches or is unset
195+ // VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf) .
196+ // If req is false, it will return true, if nbf is unset.
197197func (c * StandardClaims ) VerifyNotBefore (cmp int64 , req bool ) bool {
198198 if c .NotBefore == 0 {
199199 return verifyNbf (nil , time .Unix (cmp , 0 ), req )
0 commit comments