Auth
[ class tree: Auth ] [ index: Auth ] [ all elements ]

Class: Auth_Container_Array

Source Location: /Auth-1.6.4/Auth/Container/Array.php

Class Overview

Auth_Container
   |
   --Auth_Container_Array

Storage driver for fetching authentication data from a PHP Array


Author(s):

Version:

  • Release: @package_version@ File: $Revision: 237449 $

Copyright:

  • 2001-2006 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods

Class: Auth_Container

Auth_Container::Auth_Container()
Constructor
Auth_Container::addUser()
Add a new user to the storage container
Auth_Container::changePassword()
Change password for user in the storage container
Auth_Container::fetchData()
Fetch data from storage container
Auth_Container::getCryptType()
Returns the crypt current crypt type of the container
Auth_Container::getUser()
Returns a user assoc array
Auth_Container::listUsers()
List all users that are available from the storage container
Auth_Container::log()
Log a message to the Auth log
Auth_Container::removeUser()
Remove user from the storage container
Auth_Container::supportsChallengeResponse()
Returns true if the container supports Challenge Response
Auth_Container::verifyPassword()
Crypt and verfiy the entered password

Class Details

[line 71]
Storage driver for fetching authentication data from a PHP Array

This container takes two options when configuring:

cryptType: The crypt used to store the password. Currently recognised are: none, md5 and crypt. default: none users: A named array of usernames and passwords. Ex: array( 'guest' => '084e0343a0486ff05530df6c705c8bb4', // password guest 'georg' => 'fc77dba827fcc88e0243404572c51325' // password georg )

Usage Example: <?php $AuthOptions = array( 'users' => array( 'guest' => '084e0343a0486ff05530df6c705c8bb4', // password guest 'georg' => 'fc77dba827fcc88e0243404572c51325' // password georg ), 'cryptType'=>'md5', );

$auth = new Auth("Array", $AuthOptions); ?>

  • Author: Adam Ashley <aashley@php.net>
  • Author: georg_1 at have2 dot com
  • Version: Release: @package_version@ File: $Revision: 237449 $
  • Copyright: 2001-2006 The PHP Group
  • Since: File available since Release 1.4.0
  • License: PHP License 3.01


[ Top ]


Class Variables

$cryptType =  'none'

[line 87]

The cryptType used on the passwords

Type:   string


[ Top ]

$users =

[line 80]

The users and their password to authenticate against

Type:   array


[ Top ]



Method Detail

Auth_Container_Array (Constructor)   [line 98]

void Auth_Container_Array( array $data)

Constructor for Array Container

Parameters:

array   $data   —  Options for the container

[ Top ]

fetchData   [line 129]

boolean|PEAR_Error fetchData( string $user, string $pass)

Get user information from array

This function uses the given username to fetch the corresponding login data from the array. If an account that matches the passed username and password is found, the function returns true. Otherwise it returns false.

  • Return: Error object or boolean

Overrides Auth_Container::fetchData() (Fetch data from storage container)

Parameters:

string   $user   —  Username
string   $pass   —  Password

[ Top ]

listUsers   [line 147]

array listUsers( )

Returns a list of users available within the container

Overrides Auth_Container::listUsers() (List all users that are available from the storage container)
[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:41:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.