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

Allow rewrite of UID for SSO #313

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

digitalshow
Copy link

Allow for rewrite of UIDs using preg_replace.

An administrator can provide a pattern and a replacement parameter that get passed to PHP's preg_replace function before the UID is used to sign in to NextCloud. I use it to extract the username from a kerberos principal (pattern: /^(.*)@REALM$/, replacement: $1).

@schiessle
Copy link
Member

thanks for your contribution! 👍 Sounds like a good idea but I don't have a Kerberos setup to test it at the moment... @icewind1991 do you have a chance to review/test it?

@digitalshow
Copy link
Author

It is not limited to Kerberos, you can use it in other places where the username has to be rewritten (e.g. when the SSO mechanism passes an e-mail address or a full path from LDAP).

@digitalshow
Copy link
Author

Any news here?

@skjnldsv
Copy link
Member

@digitalshow thanks for this pr!
Could you rebase please? :)

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

Successfully merging this pull request may close these issues.

3 participants