HTTP Authentication File Resolver

category Zend
package Zend_Auth
subpackage Zend_Auth_Adapter_Http
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

__construct(string $path = ''

Parameters

$path

string

Complete filename where the credentials are stored

Returns the path to the credentials file

getFile() : string

Returns

string

Resolve credentials

resolve(string $username, string $realm) : string | false

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.

inherited_from \Zend_Auth_Adapter_Http_Resolver_Interface::resolve()

Parameters

$username

string

Username

$realm

string

Authentication Realm

Exceptions

\Zend_Auth_Adapter_Http_Resolver_Exception

Returns

stringfalseUser's shared secret, if the user is found in the realm, false otherwise.

Set the path to the credentials file

setFile(string $path) : \Zend_Auth_Adapter_Http_Resolver_File

Parameters

$path

string

Exceptions

\Zend_Auth_Adapter_Http_Resolver_Exception

Returns

\Zend_Auth_Adapter_Http_Resolver_FileProvides a fluent interface

 Properties

 

Path to credentials file

$_file : string

Default