Skip to content

Commit

Permalink
#129: Added VerifyIssuer method to RegisteredClaims (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfonfara committed Nov 24, 2021
1 parent a725c1f commit c435f38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions claims.go
Expand Up @@ -113,6 +113,12 @@ func (c *RegisteredClaims) VerifyNotBefore(cmp time.Time, req bool) bool {
return verifyNbf(&c.NotBefore.Time, cmp, req)
}

// VerifyIssuer compares the iss claim against cmp.
// If required is false, this method will return true if the value matches or is unset
func (c *RegisteredClaims) VerifyIssuer(cmp string, req bool) bool {
return verifyIss(c.Issuer, cmp, req)
}

// StandardClaims are a structured version of the JWT Claims Set, as referenced at
// https://datatracker.ietf.org/doc/html/rfc7519#section-4. They do not follow the
// specification exactly, since they were based on an earlier draft of the
Expand Down

0 comments on commit c435f38

Please sign in to comment.