| Total Complexity | 12 |
| Total Lines | 105 |
| Duplicated Lines | 0 % |
| Coverage | 84% |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class CasUser implements CasUserInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The user storage. |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | private $storage; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * CasUser constructor. |
||
| 23 | * |
||
| 24 | * @param array $data |
||
| 25 | */ |
||
| 26 | 11 | public function __construct(array $data) |
|
| 29 | 11 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | public function eraseCredentials(): void |
||
| 35 | { |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 3 | public function get(string $key, $default = null) |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | 1 | public function getAttribute(string $key, $default = null) |
|
| 50 | { |
||
| 51 | 1 | return $this->getStorage()['attributes'][$key] ?? $default; |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | 1 | public function getAttributes(): array |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | public function getPassword() |
||
| 66 | { |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * {@inheritdoc} |
||
| 71 | */ |
||
| 72 | 1 | public function getPgt(): ?string |
|
| 73 | { |
||
| 74 | 1 | return $this->get('proxyGrantingTicket'); |
|
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * {@inheritdoc} |
||
| 79 | */ |
||
| 80 | 1 | public function getRoles() |
|
| 81 | { |
||
| 82 | 1 | return ['ROLE_CAS_AUTHENTICATED']; |
|
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * {@inheritdoc} |
||
| 87 | */ |
||
| 88 | 1 | public function getSalt() |
|
| 89 | { |
||
| 90 | 1 | throw new LogicException('Not implemented.'); |
|
| 91 | } |
||
| 92 | |||
| 93 | /** |
||
| 94 | * {@inheritdoc} |
||
| 95 | */ |
||
| 96 | 1 | public function getUser(): string |
|
| 99 | } |
||
| 100 | |||
| 101 | /** |
||
| 102 | * {@inheritdoc} |
||
| 103 | */ |
||
| 104 | 1 | public function getUsername() |
|
| 105 | { |
||
| 106 | 1 | return $this->getUser(); |
|
| 107 | } |
||
| 108 | |||
| 109 | /** |
||
| 110 | * Get the storage. |
||
| 111 | * |
||
| 112 | * @return array |
||
| 113 | */ |
||
| 114 | 4 | private function getStorage() |
|
| 117 | } |
||
| 118 | } |
||
| 119 |