function oauth2_server_token_page in OAuth2 Server 7
Page callback: exchanges an authorization code for an access token.
1 string reference to 'oauth2_server_token_page'
- oauth2_server_menu in ./
oauth2_server.module - Implements hook_menu().
File
- ./
oauth2_server.pages.inc, line 151 - Page callbacks for the OAuth2 Server module.
Code
function oauth2_server_token_page() {
$request = OAuth2\Request::createFromGlobals();
$server = oauth2_server_from_request($request);
$response = new OAuth2\Response();
$server
->handleTokenRequest($request, $response);
// Allow other modules to act before the token response is sent.
module_invoke_all('oauth2_server_token', $server, $request, $response);
return oauth2_server_send_response($response);
}