Skip to content

Allow an array for audience #560

@waltertamboer

Description

@waltertamboer

Hi,

I appreciate your work a lot! Thank you!

I ran into an issue where it's not allowed to set an array as audience. I believe this is not in line with the specs:

In the general case, the "aud" value is an array of case-sensitive strings, each containing a StringOrURI value. In the special case when the JWT has one audience, the "aud" value MAY be a single case-sensitive string containing a StringOrURI value.

https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3

https://github.com/lcobucci/jwt/blob/3.4/src/Builder.php#L111
https://github.com/lcobucci/jwt/blob/master/src/Validation/Constraint/PermittedFor.php#L14

Thanks again for your hard work.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions