-
Notifications
You must be signed in to change notification settings - Fork 13
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
User provider: load by SAML attributes? #33
Comments
@quentint hi! |
Well, it could be, but I don't want to create new users, but rather load one (or none) based on the SAML attributes. Is that compatible? |
It looks like you need just User Provider, without any User Factory. If you load users from database, you can use EntityUserProvider and use SAML attributes injection. |
I've also considered this feature. But if I'm correct, it will inject SAML attributes in a User instance, which would have previously been loaded by the user provider. But what I'm looking for is a bit different: loading a user using the received SAML attributes 😉 |
If you wish use multiple attributes for user loading I have no ideas for you, sorry. |
Hi and thanks for your work on this bundle!
I'm currently in the process of integrating it inside a new Symfony site.
In my use-case I don't want the user provider to create users on SAML success, but rather:
I used to use
aerialship/saml-sp-bundle
which had a handyUserManagerInterface
withloadUserBySamlInfo(SamlSpInfo $samlInfo): UserInterface
. The user provider could implement this interface, and that method would be called on SAML auth success. See the docs for a little more details.Note: It also has a
createUserFromSamlInfo(SamlSpInfo $samlInfo): UserInterface
but I'm currently not interested in this feature 😉Is something similar currently possible (maybe listening to an event)?
If not, do you think it could improve the bundle?
Thanks!
The text was updated successfully, but these errors were encountered: