summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Viel <fviel@wanadev.fr>2014-04-24 13:50:35 +0400
committerFlorent Viel <fviel@wanadev.fr>2014-04-24 13:50:35 +0400
commit9365df6d6325aa7478720249ffaaa3e536fe8aeb (patch)
treee8c7e65385a355e091b3cb0eb489e2dfc5bae48a /src
parent91c1fa51f72168afcc2d373ba79f38d89d7d3706 (diff)
downloadoauth2-server-php-9365df6d6325aa7478720249ffaaa3e536fe8aeb.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/OAuth2/Server.php2
1 files changed, 1 insertions, 1 deletions
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