Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/AuthController.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | public static function logonResponse(User $user, string $password, string $secondFactor = null) | ||||
'username' => $user->email, | 'username' => $user->email, | ||||
'password' => $password, | 'password' => $password, | ||||
'grant_type' => 'password', | 'grant_type' => 'password', | ||||
'client_id' => \config('auth.proxy.client_id'), | 'client_id' => \config('auth.proxy.client_id'), | ||||
'client_secret' => \config('auth.proxy.client_secret'), | 'client_secret' => \config('auth.proxy.client_secret'), | ||||
'scopes' => '[*]', | 'scopes' => '[*]', | ||||
'secondfactor' => $secondFactor | 'secondfactor' => $secondFactor | ||||
]); | ]); | ||||
$proxyRequest->headers->set('X-Client-IP', request()->ip()); | |||||
$tokenResponse = app()->handle($proxyRequest); | $tokenResponse = app()->handle($proxyRequest); | ||||
return self::respondWithToken($tokenResponse, $user); | return self::respondWithToken($tokenResponse, $user); | ||||
} | } | ||||
/** | /** | ||||
* Get an oauth token via given credentials. | * Get an oauth token via given credentials. | ||||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |