-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Role <> username #20
Comments
I think it boils down to: The identity object provided by authentication should be configurable. That doesn't address your problem directly, but might lead to a solution. Originally posted by @SvenRtbg at zfcampus/zf-mvc-auth#49 (comment) |
How do yo authenticate your users exactly (which adapter did you use)? Do you handle many roles? You could use a listener to override default role id. Right now, role id is set by authentication adapter during authentication process. Originally posted by @nuxwin at zfcampus/zf-mvc-auth#49 (comment) |
I write my adapter Originally posted by @fabioginzel at zfcampus/zf-mvc-auth#49 (comment) |
So, for instance, if you're using a doctrine object repository authentication adapter, you can set whatever name you want ($identity->setName('<your_role'>), using identity object that should holds your user role. Originally posted by @nuxwin at zfcampus/zf-mvc-auth#49 (comment) |
Ok, but I think this should be configurable Originally posted by @fabioginzel at zfcampus/zf-mvc-auth#49 (comment) |
Well the role is set by adapter through the setName() method. Default behavior doesn't involve extended ACL permissions system. and anyway, adapter are not aware of full identity object. For instance HTTP adapter only know about an username, a realm and credential. To resume here, Implementation is up to you. You can always Originally posted by @nuxwin at zfcampus/zf-mvc-auth#49 (comment) |
https://github.com/API-Skeletons/zf-oauth2-doctrine hooks into your user entity and you can authenticate with User Credentials grant https://bshaffer.github.io/oauth2-server-php-docs/grant-types/user-credentials/ Originally posted by @TomHAnderson at zfcampus/zf-mvc-auth#49 (comment) |
In ZF\MvcAuth\Identity\AuthenticatedIdentity
getRoleId return name but in my case role of user is different of user name.
What's best approach?
Originally posted by @fabioginzel at zfcampus/zf-mvc-auth#49
The text was updated successfully, but these errors were encountered: