mirror of https://github.com/golang-jwt/jwt.git
fix the comment of VerifyExpiresAt (#109)
This commit is contained in:
parent
fd8cd69d8e
commit
cac353cdc2
|
@ -83,7 +83,7 @@ func (c *RegisteredClaims) VerifyAudience(cmp string, req bool) bool {
|
||||||
return verifyAud(c.Audience, cmp, req)
|
return verifyAud(c.Audience, cmp, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
// VerifyExpiresAt compares the exp claim against cmp (cmp <= exp).
|
// VerifyExpiresAt compares the exp claim against cmp (cmp < exp).
|
||||||
// If req is false, it will return true, if exp is unset.
|
// If req is false, it will return true, if exp is unset.
|
||||||
func (c *RegisteredClaims) VerifyExpiresAt(cmp time.Time, req bool) bool {
|
func (c *RegisteredClaims) VerifyExpiresAt(cmp time.Time, req bool) bool {
|
||||||
if c.ExpiresAt == nil {
|
if c.ExpiresAt == nil {
|
||||||
|
@ -170,7 +170,7 @@ func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
|
||||||
return verifyAud([]string{c.Audience}, cmp, req)
|
return verifyAud([]string{c.Audience}, cmp, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
// VerifyExpiresAt compares the exp claim against cmp (cmp <= exp).
|
// VerifyExpiresAt compares the exp claim against cmp (cmp < exp).
|
||||||
// If req is false, it will return true, if exp is unset.
|
// If req is false, it will return true, if exp is unset.
|
||||||
func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool {
|
func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool {
|
||||||
if c.ExpiresAt == 0 {
|
if c.ExpiresAt == 0 {
|
||||||
|
|
Loading…
Reference in New Issue