Fully Qualified Name: | Zend\Authentication\Adapter\Http\FileResolver |
Implements: | ResolverInterface |
HTTP Authentication File Resolver
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | FileResolver |
getFile() | Returns the path to the credentials file | FileResolver |
resolve() | Resolve credentials | FileResolver |
setFile() | Set the path to the credentials file | FileResolver |
Constructor
Parameter Name | Type | Description |
---|---|---|
$path | string | Complete |
Returns:
Returns the path to the credentials file
Returns: string
Resolve credentials
Only the first matching username/realm combination in the file is returned. If the file contains credentials for Digest authentication, the returned string is the password hash, or h(a1) from RFC 2617. The returned string is the plain-text password for Basic authentication.
The expected format of the file is: username:realm:sharedSecret
That is, each line consists of the user's username, the applicable authentication realm, and the password or hash, each delimited by colons.
Parameter Name | Type | Description |
---|---|---|
$username | string | Username |
$realm | string | Authentication |
$password |
Returns: string|bool User's shared secret, if the user is found in the realm, false otherwise.
Set the path to the credentials file
Parameter Name | Type | Description |
---|---|---|
$path | string |
Returns: self Provides a fluent interface