Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify audience claim #999

Merged
merged 1 commit into from
Apr 5, 2022
Merged

Unify audience claim #999

merged 1 commit into from
Apr 5, 2022

Conversation

aerrasti
Copy link
Contributor

@aerrasti aerrasti commented Apr 1, 2022

The 'aud' part of the payload is being converted to array, thats why we need to use UnifyAudience claim formatter to create lcobucci token.

Before the change:

{
  "iss": "iss",
  "aud": [
     "audience"
  ],
  "sub": "sub",
}

After the change

{
  "iss": "iss",
  "aud": "audience",
  "sub": "sub",
}

Check out the default method:

https://github.com/lcobucci/jwt/blob/4.2.x/src/Encoding/ChainedFormatter.php

:)

@jordisala1991
Copy link

This change is needed to be compatible with software that only accepts audiences generated as strings like https://github.com/jitsi

Copy link
Collaborator

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@chalasr
Copy link
Collaborator

chalasr commented Apr 5, 2022

Thank you @aerrasti.

@chalasr chalasr merged commit ebaaa13 into lexik:2.x Apr 5, 2022
@jordisala1991
Copy link

Can you do a patch release including this one? Many thanks 🙏 !

@chalasr
Copy link
Collaborator

chalasr commented Apr 8, 2022

Released in v2.15.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants