diff options
Diffstat (limited to 'OAuth/src/Entity/ScopeEntity.php')
-rw-r--r-- | OAuth/src/Entity/ScopeEntity.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OAuth/src/Entity/ScopeEntity.php b/OAuth/src/Entity/ScopeEntity.php new file mode 100644 index 00000000..8b3843d6 --- /dev/null +++ b/OAuth/src/Entity/ScopeEntity.php @@ -0,0 +1,26 @@ +<?php + +namespace MediaWiki\Extensions\OAuth\Entity; + +use League\OAuth2\Server\Entities\ScopeEntityInterface; +use League\OAuth2\Server\Entities\Traits\EntityTrait; + +class ScopeEntity implements ScopeEntityInterface { + use EntityTrait; + + /** + * Create generic scope entity + * + * @param string $identifier + */ + public function __construct( $identifier ) { + $this->identifier = $identifier; + } + + /** + * @return string + */ + public function jsonSerialize() { + return $this->getIdentifier(); + } +} |