// getBaseUrl is unique to HttpFoundation
$baseUrl = $request->getBaseUrl();
// call oauth server
$server->grantAccessToken($request);
use OAuth2\HttpFoundationBridge\Request as BridgeRequest;
// in your controller layer, the $request object is passed in
public function execute(Request $request)
{
//... (instantiate server/response objects)
$bridgeRequest = BridgeRequest::createFromRequest($request);
$server->grantAccessToken($bridgeRequest, $response);
}
use OAuth2\HttpFoundationBridge\Response as BridgeResponse;
// in your controller layer, the $request object is passed in
public function execute(Request $request)
{
//... (instantiate server/response objects)
$response = new BridgeResponse();
return $server->handleTokenRequest($request, $response);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.