Skip to content
This repository has been archived by the owner on Feb 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #32 from vivait/develop
Browse files Browse the repository at this point in the history
Release 0.4.3 to Master
  • Loading branch information
Kiel Goodman committed Jul 8, 2015
2 parents da1b852 + ba31edf commit 19f37e9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Vivait/LicensingClientBundle/Controller/TokenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ public function tokenAction(Request $request)
$licensingApi = $this->get('vivait_licensing_client.licensing.api');

try {
if($request->getMethod() == 'POST') {
$parameters = $request->request;
} else {
$parameters = $request->query;
}

$tokenData = $licensingApi->getToken(
$request->query->get('client_id', null),
$request->query->get('client_secret', null),
$request->query->get('grant_type', 'client_credentials')
$parameters->get('client_id', null),
$parameters->get('client_secret', null),
$parameters->get('grant_type', 'client_credentials')
);

$clientData = $licensingApi->getClient($tokenData['access_token']);

} catch (HttpException $e) {
Expand Down Expand Up @@ -69,4 +76,4 @@ public function exceptionAction(Request $request)



}
}

0 comments on commit 19f37e9

Please sign in to comment.