Skip to content

Support multiple audiences in JWT token - #68

Merged
robertlemke merged 3 commits into
flownative:mainfrom
Vogel-Account:main
Sep 11, 2026
Merged

robertlemke merged 3 commits into
flownative:mainfrom
Vogel-Account:main

Conversation

@Vogel-Account

@Vogel-Account Vogel-Account commented May 19, 2025

Copy link
Copy Markdown

Allow the JWT token to have multiple audiences

@kitsunet

Copy link
Copy Markdown
Member

Thank you so much, that is a great addition, sorry for taking a a while!

@kitsunet

Copy link
Copy Markdown
Member

Any veto @robertlemke @kdambekalns ? Would otherwise merge soon.

@robertlemke robertlemke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kdambekalns kdambekalns left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 by 👀

The audience check now lives in IdentityToken::audienceContains(). It
accepts an "aud" claim with a single string or with an array of strings
and compares the values strictly.

A loose in_array() treats numeric strings as numbers in PHP 8, so
"1e3" would match an expected audience of "1000". A security check
should not depend on such conversions. Moving the check out of the
authentication provider also makes it testable without a Flow object
manager.
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 23.64%. Comparing base (8b1e6e8) to head (57838b7).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
Classes/Authentication/OpenIdConnectProvider.php 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #68      +/-   ##
============================================
+ Coverage     22.99%   23.64%   +0.65%     
- Complexity      228      231       +3     
============================================
  Files            10       10              
  Lines           587      592       +5     
============================================
+ Hits            135      140       +5     
  Misses          452      452              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@robertlemke
robertlemke merged commit d173346 into flownative:main Sep 11, 2026
10 checks passed
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.

5 participants