AuthCredentials
in package
FinalYes
Учётные данные для SSH/SFTP и HTTP Basic Auth.
Table of Contents
Methods
- __construct() : mixed
- passphrase() : string|null
- Passphrase ключа или null.
- password() : string|null
- Пароль или null.
- privateKey() : string|null
- Приватный ключ или null.
- username() : string
- Имя пользователя.
- withPassword() : self
- Аутентификация по паролю.
- withPublicKey() : self
- Аутентификация по публичному ключу.
Methods
__construct()
public
__construct(string $username[, string|null $password = null ][, string|null $privateKey = null ][, string|null $passphrase = null ]) : mixed
Parameters
- $username : string
-
Имя пользователя
- $password : string|null = null
-
Пароль (password auth / HTTP basic)
- $privateKey : string|null = null
-
PEM/путь к приватному ключу SSH
- $passphrase : string|null = null
-
Пароль к ключу
passphrase()
Passphrase ключа или null.
public
passphrase() : string|null
Return values
string|nullpassword()
Пароль или null.
public
password() : string|null
Return values
string|nullprivateKey()
Приватный ключ или null.
public
privateKey() : string|null
Return values
string|nullusername()
Имя пользователя.
public
username() : string
Return values
stringwithPassword()
Аутентификация по паролю.
public
static withPassword(string $username, string $password) : self
Parameters
- $username : string
- $password : string
Return values
selfwithPublicKey()
Аутентификация по публичному ключу.
public
static withPublicKey(string $username, string $privateKey[, string|null $passphrase = null ]) : self
Parameters
- $username : string
- $privateKey : string
- $passphrase : string|null = null