相关疑难解决方法(0)

Laravel Passport Auth Stuck when run on standalone project for password based token authentication

Laravel Passport Auth Stuck when run on self server and client in same project for password based token authentication

LoginController

public function authenticaterrr(Request $request)

{
     $http = new Client();

    try{
                //dd("Hello");

        $response = $http->post(url('oauth/token'), [
        'form_params' => [
            'grant_type' => 'password',
            'client_id' => '2',
            'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
            // 'username' => $request->get('username'),
            // 'password' => $request->get('password'),
              'username' => 'xxxxxx@xxxxx.com',
                'password' => 'xxxxx',
            'scope'     => '*',
         ],
         ]);

       //  $apiResponse = json_decode((string) $response->getBody(), true);

       // dd($apiResponse);
         $apiResponse = json_decode((string) $response->getBody(), true);

        dd($apiResponse); …
Run Code Online (Sandbox Code Playgroud)

php oauth-2.0 laravel laravel-5 laravel-passport

2
推荐指数
1
解决办法
3263
查看次数

标签 统计

laravel ×1

laravel-5 ×1

laravel-passport ×1

oauth-2.0 ×1

php ×1