993. Class

993.1. Zend\Authentication\Adapter\Http\FileResolver

HTTP Authentication File Resolver

993.1.1. Methods

993.1.1.1. __construct

__construct()

Constructor

Parameters:string – Complete filename where the credentials are stored

993.1.1.2. setFile

setFile()

Set the path to the credentials file

Parameters:string
Return type:FileResolver Provides a fluent interface
Throws :ExceptionInvalidArgumentException if path is not readable

993.1.1.3. getFile

getFile()

Returns the path to the credentials file

Return type:string

993.1.1.4. resolve

resolve()

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.

Parameters:
  • string – Username
  • string – Authentication Realm
Return type:

string|false User’s shared secret, if the user is found in the realm, false otherwise.

Throws :

ExceptionExceptionInterface

Project Versions

Table Of Contents

Previous topic

992. Class

Next topic

994. Class

This Page