mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
CS fixer changes
This commit is contained in:
@@ -11,9 +11,6 @@
|
||||
|
||||
namespace League\OAuth2\Server\Entity;
|
||||
|
||||
use League\OAuth2\Server\Exception\OAuth2Exception;
|
||||
use League\OAuth2\Server\Storage\SessionInterface;
|
||||
use League\OAuth2\Server\Exception\ServerException;
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
@@ -78,23 +75,25 @@ class SessionEntity
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
* @return self
|
||||
*/
|
||||
public function __construct(AbstractServer $server)
|
||||
{
|
||||
$this->server = $server;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the session identifier
|
||||
* @param string $id
|
||||
* @param string $id
|
||||
* @return self
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -109,7 +108,7 @@ class SessionEntity
|
||||
|
||||
/**
|
||||
* Associate a scope
|
||||
* @param \League\OAuth2\Server\Entity\ScopeEntity $scope
|
||||
* @param \League\OAuth2\Server\Entity\ScopeEntity $scope
|
||||
* @return self
|
||||
*/
|
||||
public function associateScope(ScopeEntity $scope)
|
||||
@@ -123,7 +122,7 @@ class SessionEntity
|
||||
|
||||
/**
|
||||
* Check if access token has an associated scope
|
||||
* @param string $scope Scope to check
|
||||
* @param string $scope Scope to check
|
||||
* @return bool
|
||||
*/
|
||||
public function hasScope($scope)
|
||||
@@ -163,6 +162,7 @@ class SessionEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $scopes;
|
||||
}
|
||||
|
||||
@@ -174,6 +174,7 @@ class SessionEntity
|
||||
public function associateAccessToken(AccessTokenEntity $accessToken)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -185,6 +186,7 @@ class SessionEntity
|
||||
public function associateRefreshToken(RefreshTokenEntity $refreshToken)
|
||||
{
|
||||
$this->refreshToken = $refreshToken;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -196,6 +198,7 @@ class SessionEntity
|
||||
public function associateClient(ClientEntity $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -210,13 +213,14 @@ class SessionEntity
|
||||
}
|
||||
|
||||
$this->client = $this->server->getStorage('client')->getBySession($this);
|
||||
|
||||
return $this->client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the session owner
|
||||
* @param string $type The type of the owner (e.g. user, app)
|
||||
* @param string $id The identifier of the owner
|
||||
* @param string $type The type of the owner (e.g. user, app)
|
||||
* @param string $id The identifier of the owner
|
||||
* @return self
|
||||
*/
|
||||
public function setOwner($type, $id)
|
||||
|
||||
Reference in New Issue
Block a user