| Total Complexity | 3 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | class Tiqr_UserSecretStorage_OathServiceClient implements Tiqr_UserSecretStorage_Interface |
||
| 28 | { |
||
| 29 | private $client; |
||
| 30 | /** |
||
| 31 | * @var LoggerInterface |
||
| 32 | */ |
||
| 33 | private $logger; |
||
| 34 | |||
| 35 | 3 | public function __construct(Tiqr_API_Client $client, LoggerInterface $logger) |
|
| 36 | { |
||
| 37 | 3 | $this->logger = $logger; |
|
| 38 | 3 | $this->client = $client; |
|
| 39 | 3 | } |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Get the user's secret |
||
| 43 | * Not implemented because the idea of the oathservice is that secrets cannot be retrieved |
||
| 44 | * |
||
| 45 | * @param String $userId |
||
| 46 | * |
||
| 47 | * @return string The user's secret |
||
| 48 | */ |
||
| 49 | 1 | public function getSecret($userId) |
|
| 50 | { |
||
| 51 | 1 | $this->logger->notice('Calling getUserSecret on the OathServiceClient is not implemented'); |
|
| 52 | 1 | return null; |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Store a secret for a user |
||
| 57 | * |
||
| 58 | * Note that this storage engine does not use the encryption mechnism that PDO and File storage do implement. This |
||
| 59 | * is taken care of by the OathService itself. |
||
| 60 | * |
||
| 61 | * @param string $userId |
||
| 62 | * @param string $secret |
||
| 63 | * @throws Exception |
||
| 64 | */ |
||
| 65 | 1 | public function setSecret($userId, $secret) |
|
| 69 | 1 | } |
|
| 70 | } |
||
| 71 |