Skip to content

Commit 03f6715

Browse files
lggomezluisgabriel.gomez
authored and
luisgabriel.gomez
committed
jwt: Fix Verify methods documentation
1 parent a06361b commit 03f6715

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

claims.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
6464
}
6565

6666
// VerifyExpiresAt compares the exp claim against cmp.
67-
// If required is false, this method will return true if the value matches or is unset
67+
// If req is false, this method will return true if cmp <= exp or if exp is unset
6868
func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool {
6969
return verifyExp(c.ExpiresAt, cmp, req)
7070
}
7171

7272
// VerifyIssuedAt compares the iat claim against cmp.
73-
// If required is false, this method will return true if the value matches or is unset
73+
// If req is false, this method will return true if cmp >= iat or if iat is unset
7474
func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool {
7575
return verifyIat(c.IssuedAt, cmp, req)
7676
}
@@ -82,7 +82,7 @@ func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool {
8282
}
8383

8484
// VerifyNotBefore compares the nbf claim against cmp.
85-
// If required is false, this method will return true if the value matches or is unset
85+
// If req is false, this method will return true if cmp >= nbf or if nbf is unset
8686
func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool {
8787
return verifyNbf(c.NotBefore, cmp, req)
8888
}

map_claims.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (m MapClaims) VerifyAudience(cmp string, req bool) bool {
3232
}
3333

3434
// VerifyExpiresAt compares the exp claim against cmp.
35-
// If required is false, this method will return true if the value matches or is unset
35+
// If req is false, this method will return true if cmp <= exp or if exp is unset
3636
func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool {
3737
exp, ok := m["exp"]
3838
if !ok {
@@ -49,7 +49,7 @@ func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool {
4949
}
5050

5151
// VerifyIssuedAt compares the iat claim against cmp.
52-
// If required is false, this method will return true if the value matches or is unset
52+
// If req is false, this method will return true if cmp >= iat or if iat is unset
5353
func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool {
5454
iat, ok := m["iat"]
5555
if !ok {
@@ -73,7 +73,7 @@ func (m MapClaims) VerifyIssuer(cmp string, req bool) bool {
7373
}
7474

7575
// VerifyNotBefore compares the nbf claim against cmp.
76-
// If required is false, this method will return true if the value matches or is unset
76+
// If req is false, this method will return true if cmp >= nbf or if nbf is unset
7777
func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool {
7878
nbf, ok := m["nbf"]
7979
if !ok {

0 commit comments

Comments
 (0)