Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
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 | public function __construct(Tiqr_API_Client $client, LoggerInterface $logger) |
||
36 | { |
||
37 | $this->logger = $logger; |
||
38 | $this->client = $client; |
||
39 | } |
||
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 | public function getSecret($userId) |
||
50 | { |
||
51 | $this->logger->notice('Calling getUserSecret on the OathServiceClient is not implemented'); |
||
52 | 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 | public function setSecret($userId, $secret) |
||
69 | } |
||
70 | } |
||
71 |