Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/vendor/league/oauth2-client/src/Grant/ClientCredentials.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/league/oauth2-client/src/Grant/ClientCredentials.php')
-rw-r--r--vendor/league/oauth2-client/src/Grant/ClientCredentials.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/league/oauth2-client/src/Grant/ClientCredentials.php b/vendor/league/oauth2-client/src/Grant/ClientCredentials.php
new file mode 100644
index 0000000..7a73a79
--- /dev/null
+++ b/vendor/league/oauth2-client/src/Grant/ClientCredentials.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace League\OAuth2\Client\Grant;
+
+use League\OAuth2\Client\Token\AccessToken;
+
+class ClientCredentials implements GrantInterface
+{
+ public function __toString()
+ {
+ return 'client_credentials';
+ }
+
+ public function prepRequestParams($defaultParams, $params)
+ {
+ $params['grant_type'] = 'client_credentials';
+
+ return array_merge($defaultParams, $params);
+ }
+
+ public function handleResponse($response = array())
+ {
+ return new AccessToken($response);
+ }
+}