API Documentation

Zend/Auth/Adapter/Http/Resolver/File.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Auth  
Subpackage
Zend_Auth_Adapter_Http  
Version
$Id: File.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Auth_Adapter_Http_Resolver_File

Package: Zend\Auth\Zend\Auth\Adapter\Http

HTTP Authentication File Resolver

Implements
\Zend_Auth_Adapter_Http_Resolver_Interface
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedstring  $_file= ''

Path to credentials file

Details
Type
string

Methods

methodpublic__construct( string $path = '' ) : void

Constructor

Parameters
Name Type Description
$path string

Complete filename where the credentials are stored

methodpublicgetFile( ) : string

Returns the path to the credentials file

Returns
Type Description
string
methodpublicresolve( string $username, string $realm ) : string|false

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
Name Type Description
$username string

Username

$realm string

Authentication Realm

Returns
Type Description
string|false User's shared secret, if the user is found in the realm, false otherwise.
Throws
Exception Description
\Zend_Auth_Adapter_Http_Resolver_Exception
methodpublicsetFile( string $path ) : \Zend_Auth_Adapter_Http_Resolver_File

Set the path to the credentials file

Parameters
Name Type Description
$path string
Returns
Type Description
\Zend_Auth_Adapter_Http_Resolver_File Provides a fluent interface
Throws
Exception Description
\Zend_Auth_Adapter_Http_Resolver_Exception
Documentation was generated by DocBlox 0.15.1.