This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

singr263546
singr263546

For a site, I need to be able to have different front-end authentication options ( local (October), CAS, LDAP) depending on user. Because the User Plugin uses a custom AuthManager (October's, not Laravel's) then CAS and LDAP packages developped for Laravel can't be used so I need to code this myself (at least I can base it on existing Laravel packages). One issue I am having is that the findUserByCredentials(array $credentials) function of October\Rain\Auth\Manager is coded so as to fail if the credentials passed don't include the Login Attribute set under the User Plugin Settings (this is unlike Laravel AuthManager which can getUserByCredentials for any given credentials). While an email Login Attribute might be the best for local authentication, it will not be the case for CAS or LDAP. I believe this limitation should be removed from findUserByCredentials especially since the AuthManager provides a findUserByLogin($login) function specifically for this.

Is this a valid code change request ? Have others developped a flexible front-end authentication for October ?

Thanks.

singr263546
singr263546

I've found a solution, the $login_attribute of Rainlab\User\Models\User model is a public static variable that can be set to 'username' just prior to using Auth thereby overiding, for the request, the login_attribute of User::Settings.

benammer28845
benammer28845

Hey Singr, sorry for posting 3 years after, but have the same problem here (Authentication with LDAP) and there is still no plugin to integrate LDAP authentication for frontend users in October. Is there a chance to get your working code or do you plan to publish a plugin for this? Maybe per mail (benammer@gmx.de) Best regards, Ben

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.