2015-04-05 17:00:43 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @author Alex Bilbie <hello@alexbilbie.com>
|
|
|
|
* @copyright Copyright (c) Alex Bilbie
|
|
|
|
* @license http://mit-license.org/
|
2016-02-19 18:09:39 -05:00
|
|
|
*
|
2015-04-05 17:00:43 +01:00
|
|
|
* @link https://github.com/thephpleague/oauth2-server
|
|
|
|
*/
|
2016-04-17 13:06:05 +01:00
|
|
|
|
2015-04-05 17:00:43 +01:00
|
|
|
namespace League\OAuth2\Server\Repositories;
|
|
|
|
|
2016-04-09 15:25:45 +01:00
|
|
|
use League\OAuth2\Server\Entities\ClientEntityInterface;
|
|
|
|
use League\OAuth2\Server\Entities\ScopeEntityInterface;
|
2016-03-23 18:36:23 +00:00
|
|
|
|
2015-04-05 17:00:43 +01:00
|
|
|
/**
|
2016-02-19 18:09:39 -05:00
|
|
|
* Scope interface.
|
2015-04-05 17:00:43 +01:00
|
|
|
*/
|
|
|
|
interface ScopeRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
2016-02-19 18:09:39 -05:00
|
|
|
* Return information about a scope.
|
2015-04-05 17:00:43 +01:00
|
|
|
*
|
2016-03-24 10:04:15 +00:00
|
|
|
* @param string $identifier The scope identifier
|
2015-04-05 17:00:43 +01:00
|
|
|
*
|
2016-07-09 01:00:44 +02:00
|
|
|
* @return ScopeEntityInterface
|
2015-04-05 17:00:43 +01:00
|
|
|
*/
|
2016-03-24 10:04:15 +00:00
|
|
|
public function getScopeEntityByIdentifier($identifier);
|
2016-03-23 18:36:23 +00:00
|
|
|
|
|
|
|
/**
|
2016-03-24 10:04:15 +00:00
|
|
|
* Given a client, grant type and optional user identifier validate the set of scopes requested are valid and optionally
|
2016-03-23 18:36:23 +00:00
|
|
|
* append additional scopes or remove requested scopes.
|
|
|
|
*
|
2016-07-09 01:00:44 +02:00
|
|
|
* @param ScopeEntityInterface[] $scopes
|
|
|
|
* @param string $grantType
|
|
|
|
* @param ClientEntityInterface $clientEntity
|
|
|
|
* @param null|string $userIdentifier
|
2016-03-23 18:36:23 +00:00
|
|
|
*
|
2016-07-09 01:00:44 +02:00
|
|
|
* @return ScopeEntityInterface[]
|
2016-03-23 18:36:23 +00:00
|
|
|
*/
|
2016-03-24 10:04:15 +00:00
|
|
|
public function finalizeScopes(
|
|
|
|
array $scopes,
|
|
|
|
$grantType,
|
|
|
|
ClientEntityInterface $clientEntity,
|
|
|
|
$userIdentifier = null
|
|
|
|
);
|
2015-04-05 17:00:43 +01:00
|
|
|
}
|