| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | class Tiqr_UserSecretStorage_OathServiceClient implements Tiqr_UserSecretStorage_Interface |
||
| 26 | { |
||
| 27 | protected $_apiClient; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Construct a user class |
||
| 31 | * |
||
| 32 | * @param array $config The configuration that a specific user class may use. |
||
| 33 | */ |
||
| 34 | public function __construct($config) |
||
| 35 | { |
||
| 36 | $this->_apiClient = new Tiqr_API_Client(); |
||
| 37 | $this->_apiClient->setBaseURL($config['apiURL']); |
||
| 38 | $this->_apiClient->setConsumerKey($config['consumerKey']); |
||
| 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 getUserSecret($userId) |
||
| 50 | { |
||
| 51 | return null; |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Store a secret for a user |
||
| 56 | * |
||
| 57 | * @param String $userId |
||
| 58 | * @param String $secret |
||
| 59 | */ |
||
| 60 | public function setUserSecret($userId, $secret) |
||
| 63 | } |
||
| 64 | } |
||
| 65 |