mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-16 02:08:56 +05:30
Renamed Entities/ folder to Entity/
This commit is contained in:
parent
603efeb80d
commit
3cd5f50e64
@ -9,7 +9,7 @@
|
|||||||
* @link http://github.com/php-loep/oauth2-server
|
* @link http://github.com/php-loep/oauth2-server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
||||||
use League\OAuth2\Server\Util\SecureKey;
|
use League\OAuth2\Server\Util\SecureKey;
|
||||||
@ -130,7 +130,7 @@ abstract class AbstractToken
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate a scope
|
* Associate a scope
|
||||||
* @param \League\OAuth2\Server\Entities\Scope $scope
|
* @param \League\OAuth2\Server\Entity\Scope $scope
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function associateScope(Scope $scope)
|
public function associateScope(Scope $scope)
|
||||||
@ -158,7 +158,7 @@ abstract class AbstractToken
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all scopes associated with the session
|
* Return all scopes associated with the session
|
||||||
* @return array Array of \League\OAuth2\Server\Entities\Scope
|
* @return array Array of \League\OAuth2\Server\Entity\Scope
|
||||||
*/
|
*/
|
||||||
public function getScopes()
|
public function getScopes()
|
||||||
{
|
{
|
||||||
@ -173,7 +173,7 @@ abstract class AbstractToken
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Format the local scopes array
|
* Format the local scopes array
|
||||||
* @param array $unformated Array of Array of \League\OAuth2\Server\Entities\Scope
|
* @param array $unformated Array of \League\OAuth2\Server\Entity\Scope
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function formatScopes($unformated = [])
|
private function formatScopes($unformated = [])
|
@ -9,7 +9,7 @@
|
|||||||
* @link http://github.com/php-loep/oauth2-server
|
* @link http://github.com/php-loep/oauth2-server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
||||||
use League\OAuth2\Server\Storage\AccessTokenInterface;
|
use League\OAuth2\Server\Storage\AccessTokenInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* @link http://github.com/php-loep/oauth2-server
|
* @link http://github.com/php-loep/oauth2-server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Exception\ServerException;
|
use League\OAuth2\Server\Exception\ServerException;
|
||||||
use League\OAuth2\Server\AbstractServer;
|
use League\OAuth2\Server\AbstractServer;
|
||||||
@ -45,7 +45,7 @@ class Client
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Authorization or resource server
|
* Authorization or resource server
|
||||||
* @var \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource
|
* @var \League\OAuth2\Server\AbstractServer
|
||||||
*/
|
*/
|
||||||
protected $server;
|
protected $server;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* @link http://github.com/php-loep/oauth2-server
|
* @link http://github.com/php-loep/oauth2-server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
||||||
use League\OAuth2\Server\Storage\RefreshTokenInterface;
|
use League\OAuth2\Server\Storage\RefreshTokenInterface;
|
||||||
@ -24,13 +24,13 @@ class RefreshToken extends AbstractToken
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Access token associated to refresh token
|
* Access token associated to refresh token
|
||||||
* @var \League\OAuth2\Server\Entities\AccessToken
|
* @var \League\OAuth2\Server\Entity\AccessToken
|
||||||
*/
|
*/
|
||||||
protected $accessToken;
|
protected $accessToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an access token
|
* Associate an access token
|
||||||
* @param \League\OAuth2\Server\Entities\AccessToken $accessToken
|
* @param \League\OAuth2\Server\Entity\AccessToken $accessToken
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function setAccessToken(AccessToken $accessToken)
|
public function setAccessToken(AccessToken $accessToken)
|
@ -9,7 +9,7 @@
|
|||||||
* @link http://github.com/php-loep/oauth2-server
|
* @link http://github.com/php-loep/oauth2-server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Exception\ServerException;
|
use League\OAuth2\Server\Exception\ServerException;
|
||||||
use League\OAuth2\Server\AbstractServer;
|
use League\OAuth2\Server\AbstractServer;
|
@ -9,7 +9,7 @@
|
|||||||
* @link http://github.com/php-loep/oauth2-server
|
* @link http://github.com/php-loep/oauth2-server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entity;
|
||||||
|
|
||||||
use League\OAuth2\Server\Exception\OAuth2Exception;
|
use League\OAuth2\Server\Exception\OAuth2Exception;
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
use League\OAuth2\Server\Storage\SessionInterface;
|
||||||
@ -32,7 +32,7 @@ class Session
|
|||||||
* Client identifier
|
* Client identifier
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $clientId;
|
protected $client;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Session owner identifier
|
* Session owner identifier
|
||||||
@ -48,19 +48,19 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Auth code
|
* Auth code
|
||||||
* @var \League\OAuth2\Server\Entities\AuthCode
|
* @var \League\OAuth2\Server\Entity\AuthCode
|
||||||
*/
|
*/
|
||||||
protected $authCode;
|
protected $authCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access token
|
* Access token
|
||||||
* @var \League\OAuth2\Server\Entities\AccessToken
|
* @var \League\OAuth2\Server\Entity\AccessToken
|
||||||
*/
|
*/
|
||||||
protected $accessToken;
|
protected $accessToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Refresh token
|
* Refresh token
|
||||||
* @var \League\OAuth2\Server\Entities\RefreshToken
|
* @var \League\OAuth2\Server\Entity\RefreshToken
|
||||||
*/
|
*/
|
||||||
protected $refreshToken;
|
protected $refreshToken;
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate a scope
|
* Associate a scope
|
||||||
* @param \League\OAuth2\Server\Entities\Scope $scope
|
* @param \League\OAuth2\Server\Entity\Scope $scope
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function associateScope(Scope $scope)
|
public function associateScope(Scope $scope)
|
||||||
@ -137,7 +137,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all scopes associated with the session
|
* Return all scopes associated with the session
|
||||||
* @return array Array of \League\OAuth2\Server\Entities\Scope
|
* @return array Array of \League\OAuth2\Server\Entity\Scope
|
||||||
*/
|
*/
|
||||||
public function getScopes()
|
public function getScopes()
|
||||||
{
|
{
|
||||||
@ -150,7 +150,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Format the local scopes array
|
* Format the local scopes array
|
||||||
* @param array $unformated Array of Array of \League\OAuth2\Server\Entities\Scope
|
* @param array $unformated Array of Array of \League\OAuth2\Server\Entity\Scope
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
private function formatScopes($unformated = [])
|
private function formatScopes($unformated = [])
|
||||||
@ -166,7 +166,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an access token with the session
|
* Associate an access token with the session
|
||||||
* @param \League\OAuth2\Server\Entities\AccessToken $accessToken
|
* @param \League\OAuth2\Server\Entity\AccessToken $accessToken
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function associateAccessToken(AccessToken $accessToken)
|
public function associateAccessToken(AccessToken $accessToken)
|
||||||
@ -177,7 +177,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate a refresh token with the session
|
* Associate a refresh token with the session
|
||||||
* @param \League\OAuth2\Server\Entities\RefreshToken $refreshToken
|
* @param \League\OAuth2\Server\Entity\RefreshToken $refreshToken
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function associateRefreshToken(RefreshToken $refreshToken)
|
public function associateRefreshToken(RefreshToken $refreshToken)
|
||||||
@ -188,7 +188,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate an authorization code with the session
|
* Associate an authorization code with the session
|
||||||
* @param \League\OAuth2\Server\Entities\AuthCode $authCode
|
* @param \League\OAuth2\Server\Entity\AuthCode $authCode
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function associateAuthCode(AuthCode $authCode)
|
public function associateAuthCode(AuthCode $authCode)
|
||||||
@ -199,7 +199,7 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Associate a client with the session
|
* Associate a client with the session
|
||||||
* @param League\OAuth2\Server\Entities\Client $client The client
|
* @param League\OAuth2\Server\Entity\Client $client The client
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function associateClient(Client $client)
|
public function associateClient(Client $client)
|
||||||
@ -210,10 +210,15 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the session client
|
* Return the session client
|
||||||
* @return League\OAuth2\Server\Entities\Client
|
* @return League\OAuth2\Server\Entity\Client
|
||||||
*/
|
*/
|
||||||
public function getClient()
|
public function getClient()
|
||||||
{
|
{
|
||||||
|
if ($this->client instanceof Client) {
|
||||||
|
return $this->client;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->client = $this->server->getStorage('client')->getBySession($this->getId());
|
||||||
return $this->client;
|
return $this->client;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user