diff options
| author | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-05-03 22:24:03 -0400 |
|---|---|---|
| committer | Frédéric Guillot <fguillot@users.noreply.github.com> | 2014-05-03 22:24:03 -0400 |
| commit | 560a12f0bd6347a335f8ed5201d6d9562d03d4bc (patch) | |
| tree | 00510d25c1cf5e747573543fa88d44ef003b1c9a /vendor/OAuth/Common/Service/ServiceInterface.php | |
| parent | 9531e439cd99fb7dbcfb039f422f1d1ba414ec30 (diff) | |
Add Google authentication
Diffstat (limited to 'vendor/OAuth/Common/Service/ServiceInterface.php')
| -rwxr-xr-x | vendor/OAuth/Common/Service/ServiceInterface.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/OAuth/Common/Service/ServiceInterface.php b/vendor/OAuth/Common/Service/ServiceInterface.php new file mode 100755 index 00000000..5856a039 --- /dev/null +++ b/vendor/OAuth/Common/Service/ServiceInterface.php @@ -0,0 +1,49 @@ +<?php + +namespace OAuth\Common\Service; + +use OAuth\Common\Http\Uri\UriInterface; + +/** + * Defines methods common among all OAuth services. + */ +interface ServiceInterface +{ + /** + * Sends an authenticated API request to the path provided. + * If the path provided is not an absolute URI, the base API Uri (service-specific) will be used. + * + * @param string|UriInterface $path + * @param string $method HTTP method + * @param array $body Request body if applicable (an associative array will + * automatically be converted into a urlencoded body) + * @param array $extraHeaders Extra headers if applicable. These will override service-specific + * any defaults. + * + * @return string + */ + public function request($path, $method = 'GET', $body = null, array $extraHeaders = array()); + + /** + * Returns the url to redirect to for authorization purposes. + * + * @param array $additionalParameters + * + * @return UriInterface + */ + public function getAuthorizationUri(array $additionalParameters = array()); + + /** + * Returns the authorization API endpoint. + * + * @return UriInterface + */ + public function getAuthorizationEndpoint(); + + /** + * Returns the access token API endpoint. + * + * @return UriInterface + */ + public function getAccessTokenEndpoint(); +} |
