From 87a142cc3088edfc8ed706bd6d37ede632ade115 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 29 Jan 2013 16:24:48 +0000 Subject: [PATCH] Updated getCurrentGrantType method --- src/OAuth2/AuthServer.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/OAuth2/AuthServer.php b/src/OAuth2/AuthServer.php index d6701f81..5a7cb227 100644 --- a/src/OAuth2/AuthServer.php +++ b/src/OAuth2/AuthServer.php @@ -268,13 +268,13 @@ class AuthServer throw new Exception\ClientException(sprintf($this->errors['unsupported_grant_type'], $params['grant_type']), 7); } - protected function getCurrentGrantType() - { - $grantType = $this->getRequest()->post('grant_type'); + // Complete the flow + return $this->getCurrentGrantType($params['grant_type'])->completeFlow($authParams, $params); + } - if (is_null($grantType)) { - throw new Exception; - } + protected function getCurrentGrantType($grantType) + { + return $this->grantTypes[$grantType]; } }