mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 18:19:47 +05:30
Added model variable storage
This commit is contained in:
parent
f74a35074a
commit
d63c0ea262
@ -2,6 +2,10 @@
|
||||
|
||||
namespace OAuth2;
|
||||
|
||||
use OAuth2\Storage\SessionInterface;
|
||||
use OAuth2\Storage\ClientInterface;
|
||||
use OAuth2\Storage\ScopeInterface;
|
||||
|
||||
class AuthServer
|
||||
{
|
||||
protected $scopeDelimeter = ',';
|
||||
@ -18,9 +22,14 @@ class AuthServer
|
||||
|
||||
protected $request = null;
|
||||
|
||||
public function __construct($storage)
|
||||
{
|
||||
|
||||
public function __construct(ClientInterface $client, SessionInterface $session, ScopeInterface $scope)
|
||||
{
|
||||
$this->storages = array(
|
||||
'client' => $client,
|
||||
'session' => $session,
|
||||
'scope' => $scope
|
||||
);
|
||||
}
|
||||
|
||||
public function addGrantType(GrantTypeInterface $grant_type, $identifier = null)
|
||||
@ -75,6 +84,11 @@ class AuthServer
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
public function getStorage($obj)
|
||||
{
|
||||
return $this->storages[$obj];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check client authorise parameters
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user