Total Complexity | 3 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class PublicKey extends Configuration implements Authentication |
||
14 | { |
||
15 | /** |
||
16 | * Username. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $username; |
||
21 | |||
22 | /** |
||
23 | * Public key file. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $pubkeyfile; |
||
28 | |||
29 | /** |
||
30 | * Private key file. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $privkeyfile; |
||
35 | |||
36 | /** |
||
37 | * Passphrase. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $passphrase; |
||
42 | |||
43 | /** |
||
44 | * Constructor. |
||
45 | * |
||
46 | * @param object $configuration Configuration object |
||
47 | * @return void |
||
48 | */ |
||
49 | public function __construct(Configuration $configuration) |
||
50 | { |
||
51 | $this->username = $configuration->get_username(); |
||
52 | $this->pubkeyfile = $configuration->get_publickey(); |
||
53 | $this->privkeyfile = $configuration->get_privatekey(); |
||
54 | $this->passphrase = $configuration->get_passphrase(); |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * {@inheritDoc} |
||
59 | */ |
||
60 | final public function authenticate($resource) |
||
71 | } |
||
72 | } |
||
74 |