mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 13:39:48 +05:30
Response types are now generated from grants that are injected in
This commit is contained in:
parent
d63c0ea262
commit
a189156f26
@ -12,9 +12,7 @@ class AuthServer
|
|||||||
|
|
||||||
protected $expiresIn = 3600;
|
protected $expiresIn = 3600;
|
||||||
|
|
||||||
protected $responseTypes = array(
|
protected $responseTypes = array();
|
||||||
'code'
|
|
||||||
);
|
|
||||||
|
|
||||||
protected $storages = array();
|
protected $storages = array();
|
||||||
|
|
||||||
@ -32,12 +30,16 @@ class AuthServer
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addGrantType(GrantTypeInterface $grant_type, $identifier = null)
|
public function addGrantType(GrantTypeInterface $grantType, $identifier = null)
|
||||||
{
|
{
|
||||||
if (is_null($identifier)) {
|
if (is_null($identifier)) {
|
||||||
$identifier = $grant_type->getIdentifier();
|
$identifier = $grantType->getIdentifier();
|
||||||
|
}
|
||||||
|
$this->grantTypes[$identifier] = $grantType;
|
||||||
|
|
||||||
|
if (! is_null($grantType->getResponseType())) {
|
||||||
|
$this->responseTypes[] = $grantType->getResponseType();
|
||||||
}
|
}
|
||||||
$this->grantTypes[$identifier] = $grant_type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getScopeDelimeter()
|
public function getScopeDelimeter()
|
||||||
|
Loading…
Reference in New Issue
Block a user