| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 22 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 19 | public function issueToken(PasswordGrantProxyControllerRequest $request)  | 
            ||
| 20 |     { | 
            ||
| 21 | $http = new Client;  | 
            ||
| 22 | |||
| 23 |         $client = DB::table('oauth_clients')->where('id', 2)->first(); | 
            ||
| 24 | |||
| 25 | // dump($request->username);  | 
            ||
| 26 | // dump($request->password);  | 
            ||
| 27 | // dump($client->redirect);  | 
            ||
| 28 | |||
| 29 |         $response = $http->post(url('http://tasks.test/oauth/token'), [ | 
            ||
| 30 | 'form_params' => [  | 
            ||
| 31 | 'grant_type' => 'password',  | 
            ||
| 32 | 'client_id' => $client->id,  | 
            ||
| 33 | 'client_secret' => $client->secret,  | 
            ||
| 34 | 'username' => $request->username,  | 
            ||
| 35 | 'password' => $request->password,  | 
            ||
| 36 | 'scope' => '',  | 
            ||
| 37 | ],  | 
            ||
| 38 | ]);  | 
            ||
| 39 | |||
| 40 | return json_decode((string) $response->getBody(), true);  | 
            ||
| 41 | }  | 
            ||
| 43 |