summaryrefslogtreecommitdiff
path: root/vendor/OAuth/OAuth2/Service/ServiceInterface.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fguillot@users.noreply.github.com>2014-05-03 22:24:03 -0400
committerFrédéric Guillot <fguillot@users.noreply.github.com>2014-05-03 22:24:03 -0400
commit560a12f0bd6347a335f8ed5201d6d9562d03d4bc (patch)
tree00510d25c1cf5e747573543fa88d44ef003b1c9a /vendor/OAuth/OAuth2/Service/ServiceInterface.php
parent9531e439cd99fb7dbcfb039f422f1d1ba414ec30 (diff)
Add Google authentication
Diffstat (limited to 'vendor/OAuth/OAuth2/Service/ServiceInterface.php')
-rwxr-xr-xvendor/OAuth/OAuth2/Service/ServiceInterface.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/OAuth/OAuth2/Service/ServiceInterface.php b/vendor/OAuth/OAuth2/Service/ServiceInterface.php
new file mode 100755
index 00000000..f3d1bdad
--- /dev/null
+++ b/vendor/OAuth/OAuth2/Service/ServiceInterface.php
@@ -0,0 +1,37 @@
+<?php
+
+namespace OAuth\OAuth2\Service;
+
+use OAuth\Common\Consumer\CredentialsInterface;
+use OAuth\Common\Storage\TokenStorageInterface;
+use OAuth\Common\Token\TokenInterface;
+use OAuth\Common\Http\Client\ClientInterface;
+use OAuth\Common\Http\Exception\TokenResponseException;
+use OAuth\Common\Service\ServiceInterface as BaseServiceInterface;
+use OAuth\Common\Http\Uri\UriInterface;
+
+/**
+ * Defines the common methods across OAuth 2 services.
+ */
+interface ServiceInterface extends BaseServiceInterface
+{
+ /**
+ * Authorization methods for various services
+ */
+ const AUTHORIZATION_METHOD_HEADER_OAUTH = 0;
+ const AUTHORIZATION_METHOD_HEADER_BEARER = 1;
+ const AUTHORIZATION_METHOD_QUERY_STRING = 2;
+ const AUTHORIZATION_METHOD_QUERY_STRING_V2 = 3;
+ const AUTHORIZATION_METHOD_QUERY_STRING_V3 = 4;
+
+ /**
+ * Retrieves and stores/returns the OAuth2 access token after a successful authorization.
+ *
+ * @param string $code The access code from the callback.
+ *
+ * @return TokenInterface $token
+ *
+ * @throws TokenResponseException
+ */
+ public function requestAccessToken($code);
+}