0

I'm developing a Laravel 5.5 application with MSSQL database.

My question is, how to authenticate a given user with 'username' and 'password'. The MSSQL stored procedure accepts these two parameters, and returns 'userLevel' and 'projectID' if the user exists, and 'false' otherwise. The database can not be modified by any means, so I have to tweak the auth process in Laravel.

Note: The 'userLevel' and 'processID' should be included in 'auth()->user()' if auth succeeded. How I'm I supposed to do this?

icemanblas
  • 93
  • 1
  • 1
  • 10
  • Please post any code that you tried so far. Otherwise this looks like a "do my work for me for free" type of question – Nick.Mc Oct 29 '17 at 23:56
  • I did not try anything, but my intention was just to get the basic idea, not to get a solution for free. Anyway, I will connect an Eloquent model with the db table 'users' and try to use the default Laravel auth. Thanks – icemanblas Oct 30 '17 at 00:01
  • There are many online examples with the basic idea. Here's the first one that came up in google: https://stackoverflow.com/questions/34497063/how-to-execute-stored-procedure-from-laravel – Nick.Mc Oct 30 '17 at 00:03
  • Thank you for your input. Executing the stored procedure is not the problem, but the authentication itself. I think I got it, and I will post the solution if that's the case. – icemanblas Oct 30 '17 at 00:10
  • @icemanblas did you find a solution please? – party-ring Jul 29 '20 at 08:20

0 Answers0