Hello Lara-people !
First of all, I'm pretty new to Laravel (and PHP in general) so I don't know if what i'm trying to do is even possible.
I have to set up an authentication system on Laravel 5.1.19 that will handle two types of users: CMS admin users and regular end users.
The CMS admin credentials will be mapped in Laravel's database so i can use the default Laravel auth mechanism (Eloquent model & all)
The regular users will be stored on a different db that won't be directly accessible. The credential checking for regulars is implemented via a REST call to a dedicated server that can query that db.
Admins and regulars will have different login pages. My questions are:
#How can I have two auth mechanisms mapped to two separate routes?
Say /login/admin is the login URL for CMS admins. This request should be handled by the default auth.
Say /login/users is the login URL for regulars. This should be handled by a custom auth that will issue REST requests to a different server for credential checking and retrieval of other necessary user info.
#How can I implement a custom auth mechanism that doesn't store any info in Laravel's db? Making REST calls should be easy. My problem is that all auth tutorials assume that the user will be mapped in a db table and my requirements make it impossible to do so. I read a post here where somebody said that he tried to save the User object in Session but he didn't get into much detail.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community