From c80c15dcc33a70acc2b177691d33f088f8c2541e Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 6 Nov 2014 06:41:47 -0500 Subject: Include all vendor files in the repo to be easier for people --- .../oauth/tests/Mocks/OAuth2/Service/Mock.php | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php (limited to 'vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php') diff --git a/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php b/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php new file mode 100644 index 00000000..508aea00 --- /dev/null +++ b/vendor/lusitanian/oauth/tests/Mocks/OAuth2/Service/Mock.php @@ -0,0 +1,58 @@ +authorizationMethod = $method; + } + + /** + * Returns a class constant from ServiceInterface defining the authorization method used for the API + * Header is the sane default. + * + * @return int + */ + protected function getAuthorizationMethod() + { + switch($this->authorizationMethod) { + case 'querystring': + return static::AUTHORIZATION_METHOD_QUERY_STRING; + + case 'querystring2': + return static::AUTHORIZATION_METHOD_QUERY_STRING_V2; + + case 'bearer': + return static::AUTHORIZATION_METHOD_HEADER_BEARER; + } + + return parent::getAuthorizationMethod(); + } +} -- cgit v1.2.3