0
laravel을 사용하여 서버 및 클라이언트 응용 프로그램을 모두 성공적으로 만들었으므로 서버 응용 프로그램에서 클라이언트 응용 프로그램으로 데이터에 액세스 할 수도 있습니다. 하지만 이제 codeigniter를 사용하여 다른 클라이언트 응용 프로그램을 만들고 싶습니다. 권한 부여는 콜백 메소드를 제외하고 작동합니다. 그렇다면 어떻게이 코드를 변환 할 수 있습니까?Laravel 패스포트 "코드에 액세스 할 수있는 인증 코드 변환"코드 번호
Route::get('/callback', function (Request $request) {
$http = new GuzzleHttp\Client;
$response = $http->post('http://your-app.com/oauth/token', [
'form_params' => [
'grant_type' => 'authorization_code',
'client_id' => 'client-id',
'client_secret' => 'client-secret',
'redirect_uri' => 'http://example.com/callback',
'code' => $request->code,
],
]);
return json_decode((string) $response->getBody(), true);
});
into CodeIgniter 2?
감사합니다.