mirror of
https://github.com/elyby/accounts.git
synced 2024-12-26 23:20:18 +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;
|
|
}
|
|
|
|
}
|