Laravel - Setting session variables when using Basic Auth -
i'm implementing api clients can access our system. i'm using auth basic authentication. there way me set additional session variables when authenticate way?
there session variables set when log in login page, , there functionality depends on values. i'll need way set same variables, when using auth basic middleware.
you can write own basic auth controllers , functions described in laravel documentation
your authentication controller this:
<?php namespace app\http\controllers; use auth; use illuminate\routing\controller; class authcontroller extends controller { /** * handle authentication attempt. * * @return response */ public function authenticate() { if (auth::attempt(['email' => $email, 'password' => $password])) { // authentication passed... return redirect()->intended('dashboard'); } } }
Comments
Post a Comment