diff --git a/src/League/OAuth2/Server/Authorization.php b/src/League/OAuth2/Server/Authorization.php index 32748d8a..4dec4695 100644 --- a/src/League/OAuth2/Server/Authorization.php +++ b/src/League/OAuth2/Server/Authorization.php @@ -261,6 +261,11 @@ class Authorization return (array_key_exists($identifier, $this->grantTypes)); } + /** + * Returns response types + * + * @return array + */ public function getResponseTypes() { return $this->responseTypes; @@ -287,11 +292,12 @@ class Authorization /** * Default scope to be used if none is provided and requireScopeParam is false - * @var string|array + * @param string|array $default */ public function setDefaultScope($default = null) { $this->defaultScope = $default; + return $this; } /** @@ -321,6 +327,7 @@ class Authorization public function requireStateParam($require = true) { $this->requireStateParam = $require; + return $this; } /** @@ -341,6 +348,7 @@ class Authorization public function setScopeDelimeter($scopeDelimeter = ' ') { $this->scopeDelimeter = $scopeDelimeter; + return $this; } /** @@ -359,6 +367,7 @@ class Authorization public function setAccessTokenTTL($accessTokenTTL = 3600) { $this->accessTokenTTL = $accessTokenTTL; + return $this; } /** @@ -369,6 +378,7 @@ class Authorization public function setRequest(Util\RequestInterface $request) { $this->request = $request; + return $this; } /** @@ -381,7 +391,6 @@ class Authorization if ($this->request === null) { // @codeCoverageIgnoreStart $this->request = Request::buildFromGlobals(); - } // @codeCoverageIgnoreEnd diff --git a/src/League/OAuth2/Server/Resource.php b/src/League/OAuth2/Server/Resource.php index bc02b961..55339567 100644 --- a/src/League/OAuth2/Server/Resource.php +++ b/src/League/OAuth2/Server/Resource.php @@ -93,6 +93,7 @@ class Resource public function setRequest(RequestInterface $request) { $this->request = $request; + return $this; } /** @@ -129,6 +130,7 @@ class Resource public function setTokenKey($key) { $this->tokenKey = $key; + return $this; } /**