php - oauth access token by authorization header when POST -
is possible receive access token header (post) when delete meaning:
authorization : bearer 08712391237918273192873token
instead of:
{ access_token : 08712391237918273192873token }
my server implementation is:
$storage = new oauth2\storage\pdo(array(myconfig)); $server = new oauth2\server($storage, array( 'always_issue_new_refresh_token' => true, 'refresh_token_lifetime' => 2419200, )); $server->addgranttype(new oauth2\granttype\clientcredentials($storage)); $server->addgranttype(new oauth2\granttype\authorizationcode($storage)); $server->addgranttype(new oauth2\granttype\refreshtoken($storage)); if (!$server->verifyresourcerequest(oauth2\request::createfromglobals())) { $server->getresponse()->send(); exit; }
yes, see in code @ https://github.com/bshaffer/oauth2-server-php/blob/develop/src/oauth2/tokentype/bearer.php#l63 server try obtain token header, query parameters or post body (in order) , make sure 1 of methods used @ time.
Comments
Post a Comment