1 | <?php |
||
10 | class SSH2HostBasedFile implements SSH2AuthInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $username; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $hostname; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $publicKeyFile; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $privateKeyFile; |
||
31 | |||
32 | /** |
||
33 | * @var null|string |
||
34 | */ |
||
35 | protected $passPhrase; |
||
36 | |||
37 | /** |
||
38 | * @var null|string |
||
39 | */ |
||
40 | protected $localUsername; |
||
41 | |||
42 | /** |
||
43 | * @param string $username The authentication username |
||
44 | * @param string $hostname The authentication hostname |
||
45 | * @param string $publicKeyFile The path of the public key file |
||
46 | * @param string $privateKeyFile The path of the private key file |
||
47 | * @param string $passPhrase An optional pass phrase for the key |
||
48 | * @param string $localUsername An optional local usernale. If omitted, the username will be used |
||
49 | */ |
||
50 | 2 | public function __construct($username, $hostname, $publicKeyFile, $privateKeyFile, $passPhrase = null, $localUsername = null) |
|
59 | |||
60 | /** |
||
61 | * @override |
||
62 | * @inheritDoc |
||
63 | */ |
||
64 | public function authenticate($conn) |
||
76 | } |
||
77 |