WithAllAudiences configures the validator to require all the specified audiences in the `aud` claim. Validation will fail if the specified audiences are not listed in the token or the `aud` claim is missing. Duplicates within the list are de-duplicated since internally, we use a map to look up the a
(aud ...string)
| 97 | // writing secure application, we decided to REQUIRE the existence of the claim, |
| 98 | // if an audience is expected. |
| 99 | func WithAllAudiences(aud ...string) ParserOption { |
| 100 | return func(p *Parser) { |
| 101 | p.validator.expectedAud = aud |
| 102 | p.validator.expectAllAud = true |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | // WithIssuer configures the validator to require the specified issuer in the |
| 107 | // `iss` claim. Validation will fail if a different issuer is specified in the |
no outgoing calls