API Documentation

Auth/Adapter/Http/Resolver/File.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Auth
subpackage
Zend_Auth_Adapter_Http
version
$Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Auth_Adapter_Http_Resolver_File

Description

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.

Zend_Auth_Adapter_Http_Resolver_File

Implements
Zend_Auth_Adapter_Http_Resolver_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Auth
subpackage
Zend_Auth_Adapter_Http
Properties
$_file
Methods
__construct
setFile
getFile
resolve

Description

HTTP Authentication File Resolver

Properties

$_file

string $_file = ''

Path to credentials file

Details

$_file
string
visibility
protected
default
final
false
static
false

Methods

__construct

__construct( string $path ) : void

Constructor

Arguments
$path
string
Complete filename where the credentials are stored
Details
visibility
public
final
false
static
false

getFile

getFile( ) : string

Returns the path to the credentials file

Output
string
Details
visibility
public
final
false
static
false

resolve

resolve( 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.

Arguments
$username
string
Username
$realm
string
Authentication Realm
Output
string|false
User's shared secret, if the user is found in the realm, false otherwise.
Details
visibility
public
final
false
static
false
throws

setFile

setFile( string $path ) : Zend_Auth_Adapter_Http_Resolver_File

Set the path to the credentials file

Arguments
$path
string
Output
Zend_Auth_Adapter_Http_Resolver_File
Provides a fluent interface
Details
visibility
public
final
false
static
false
throws
Documentation was generated by DocBlox.