mirror of
https://github.com/elyby/accounts.git
synced 2024-11-17 02:32:59 +05:30
31 lines
537 B
PHP
31 lines
537 B
PHP
<?php
|
|
namespace api\components\User;
|
|
|
|
use Emarref\Jwt\Claim\AbstractClaim;
|
|
|
|
class ScopesClaim extends AbstractClaim {
|
|
|
|
public const NAME = 'ely-scopes';
|
|
|
|
/**
|
|
* ScopesClaim constructor.
|
|
*
|
|
* @param array|string $value
|
|
*/
|
|
public function __construct($value = null) {
|
|
if (is_array($value)) {
|
|
$value = implode(',', $value);
|
|
}
|
|
|
|
parent::__construct($value);
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function getName(): string {
|
|
return self::NAME;
|
|
}
|
|
|
|
}
|