From 9365df6d6325aa7478720249ffaaa3e536fe8aeb Mon Sep 17 00:00:00 2001 From: Florent Viel Date: Thu, 24 Apr 2014 11:50:35 +0200 Subject: Add: grantType to server based on indentifier If $key is not provided Server::addGrantType is called, add the grant type base on qyery string identifier for better consistency --- src/OAuth2/Server.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/OAuth2/Server.php b/src/OAuth2/Server.php index edc9faf..b138a55 100644 --- a/src/OAuth2/Server.php +++ b/src/OAuth2/Server.php @@ -350,7 +350,7 @@ class Server implements ResourceControllerInterface, if (is_string($key)) { $this->grantTypes[$key] = $grantType; } else { - $this->grantTypes[] = $grantType; + $this->grantTypes[$grantType->getQuerystringIdentifier()] = $grantType; } // persist added grant type down to TokenController -- cgit v1.2.3