| 1 | <?php |
||
| 22 | class NameAndPasswordCredential implements AuthCredentialInterface |
||
| 23 | { |
||
| 24 | /** @var string */ |
||
| 25 | private $username = ''; |
||
| 26 | /** @var string */ |
||
| 27 | private $password = ''; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set a credential. |
||
| 31 | * |
||
| 32 | * @param string $key |
||
| 33 | * @param string $value |
||
| 34 | * @throws InvalidArgumentException |
||
| 35 | * @return AuthCredentialInterface |
||
| 36 | */ |
||
| 37 | 1 | public function addCredential(string $key, string $value) : AuthCredentialInterface |
|
| 60 | |||
| 61 | /** |
||
| 62 | * Returns the credentials in a key => value array. |
||
| 63 | * |
||
| 64 | * @return array |
||
| 65 | */ |
||
| 66 | 1 | public function getCredentials() : array |
|
| 70 | } |
||
| 71 |