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

Add support for comma-separated groups in group mapping attribute #1006

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

julien-nc
Copy link
Member

Some IdPs can't provide JSON values in token attributes.

@julien-nc julien-nc added enhancement New feature or request 3. to review labels Dec 6, 2024
Copy link
Member

@janepie janepie left a comment

Choose a reason for hiding this comment

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

Looks good :)

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc force-pushed the enh/noid/group-provisioning-string-support branch from c95217a to c39164a Compare December 6, 2024 15:47
@julien-nc julien-nc requested a review from janepie December 6, 2024 15:47
// support values like group1,group2
if (is_string($groups)) {
$groups = explode(',', $groups);
$groups = array_filter($groups);
Copy link
Contributor

Choose a reason for hiding this comment

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

In case there is any excess whitespace in the string, maybe it would also be a good idea to use trim/mb_trim to remove them.
wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants