2016-11-27 03:13:42 +05:30
|
|
|
<?php
|
2019-08-23 13:58:04 +05:30
|
|
|
declare(strict_types=1);
|
2016-11-27 03:13:42 +05:30
|
|
|
|
2019-08-23 13:58:04 +05:30
|
|
|
namespace api\components\OAuth2\Entities;
|
2016-11-27 03:13:42 +05:30
|
|
|
|
2019-08-23 13:58:04 +05:30
|
|
|
use League\OAuth2\Server\Entities\ClientEntityInterface;
|
|
|
|
use League\OAuth2\Server\Entities\Traits\ClientTrait;
|
|
|
|
use League\OAuth2\Server\Entities\Traits\EntityTrait;
|
2016-12-18 04:50:53 +05:30
|
|
|
|
2019-08-23 13:58:04 +05:30
|
|
|
class ClientEntity implements ClientEntityInterface {
|
|
|
|
use EntityTrait;
|
|
|
|
use ClientTrait;
|
2016-11-27 03:13:42 +05:30
|
|
|
|
2019-09-22 02:47:21 +05:30
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
private $isTrusted;
|
|
|
|
|
|
|
|
public function __construct(string $id, string $name, $redirectUri, bool $isTrusted) {
|
2019-08-23 13:58:04 +05:30
|
|
|
$this->identifier = $id;
|
2016-11-27 03:13:42 +05:30
|
|
|
$this->name = $name;
|
|
|
|
$this->redirectUri = $redirectUri;
|
2019-09-22 02:47:21 +05:30
|
|
|
$this->isTrusted = $isTrusted;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isConfidential(): bool {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isTrusted(): bool {
|
|
|
|
return $this->isTrusted;
|
2016-12-18 04:50:53 +05:30
|
|
|
}
|
|
|
|
|
2016-11-27 03:13:42 +05:30
|
|
|
}
|