summaryrefslogtreecommitdiff
path: root/vendor/OAuth/Common/Http/Client/ClientInterface.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/Common/Http/Client/ClientInterface.php
parent9531e439cd99fb7dbcfb039f422f1d1ba414ec30 (diff)
Add Google authentication
Diffstat (limited to 'vendor/OAuth/Common/Http/Client/ClientInterface.php')
-rwxr-xr-xvendor/OAuth/Common/Http/Client/ClientInterface.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/OAuth/Common/Http/Client/ClientInterface.php b/vendor/OAuth/Common/Http/Client/ClientInterface.php
new file mode 100755
index 00000000..f9c20226
--- /dev/null
+++ b/vendor/OAuth/Common/Http/Client/ClientInterface.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace OAuth\Common\Http\Client;
+
+use OAuth\Common\Http\Uri\UriInterface;
+use OAuth\Common\Http\Exception\TokenResponseException;
+
+/**
+ * Any HTTP clients to be used with the library should implement this interface.
+ */
+interface ClientInterface
+{
+ /**
+ * Any implementing HTTP providers should send a request to the provided endpoint with the parameters.
+ * They should return, in string form, the response body and throw an exception on error.
+ *
+ * @param UriInterface $endpoint
+ * @param mixed $requestBody
+ * @param array $extraHeaders
+ * @param string $method
+ *
+ * @return string
+ *
+ * @throws TokenResponseException
+ */
+ public function retrieveResponse(
+ UriInterface $endpoint,
+ $requestBody,
+ array $extraHeaders = array(),
+ $method = 'POST'
+ );
+}