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

Class: Auth_Container_IMAP

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

Class Overview

Auth_Container
   |
   --Auth_Container_IMAP

Storage driver for fetching login data from an IMAP server


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 84]
Storage driver for fetching login data from an IMAP server

This class is based on LDAP containers, but it very simple. By default it connects to localhost:143 The constructor will first check if the host:port combination is actually reachable. This behaviour can be disabled. It then tries to create an IMAP stream (without opening a mailbox) If you wish to pass extended options to the connections, you may do so by specifying protocol options.

To use this storage containers, you have to use the following syntax:

<?php ... $params = array( 'host' => 'mail.example.com', 'port' => 143, ); $myAuth = new Auth('IMAP', $params); ...

By default we connect without any protocol options set. However, some servers require you to connect with the notls or norsh options set. To do this you need to add the following value to the params array: 'baseDSN' => '/imap/notls/norsh'

To connect to an SSL IMAP server: 'baseDSN' => '/imap/ssl'

To connect to an SSL IMAP server with a self-signed certificate: 'baseDSN' => '/imap/ssl/novalidate-cert'

Further options may be available and can be found on the php site at http://www.php.net/manual/function.imap-open.php



[ Top ]


Class Variables

$options = array()

[line 93]

Options for the class

Type:   array


[ Top ]



Method Detail

Auth_Container_IMAP (Constructor)   [line 106]

object Returns Auth_Container_IMAP( $params $params)

Constructor of the container class
  • Return: an error object if something went wrong
  • Todo: Use PEAR Net_IMAP if IMAP extension not loaded

Parameters:

$params   $params   —  associative array with host, port, baseDSN, checkServer and userattr key

[ Top ]

fetchData   [line 190]

boolean fetchData( string $username, string $password)

Try to open a IMAP stream using $username / $password

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

Parameters:

string   $username   —  Username
string   $password   —  Password

[ Top ]


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