/functions/auth.php

Description

auth.php

Contains functions used to do authentication.

Functions
cram_md5_response (line 89)

Given the challenge from the server, supply the response using cram-md5 (See RFC 2195 for details)

  • return: The response to be sent to the IMAP server
string cram_md5_response (string $username, string $password, string $challenge)
  • string $username: User ID
  • string $password: User password supplied by User
  • string $challenge: The challenge supplied by the server
digest_md5_parse_challenge (line 165)

Parse Digest-MD5 challenge.

This function parses the challenge sent during DIGEST-MD5 authentication and returns an array. See the RFC for details on what's in the challenge string.

  • return: Digest-MD5 challenge decoded data
array digest_md5_parse_challenge (string $challenge)
  • string $challenge: Digest-MD5 Challenge
digest_md5_response (line 111)

Return Digest-MD5 response.

Given the challenge from the server, calculate and return the response-string for digest-md5 authentication. (See RFC 2831 for more details)

  • return: The response to be sent to the IMAP server
string digest_md5_response (string $username, string $password, string $challenge, string $service, string $host)
  • string $username: User ID
  • string $password: User password supplied by User
  • string $challenge: The challenge supplied by the server
  • string $service: The service name, usually 'imap'; it is used to define the digest-uri.
  • string $host: The host name, usually the server's FQDN; it is used to define the digest-uri.
hmac_md5 (line 211)

Creates a HMAC digest that can be used for auth purposes See RFCs 2104, 2617, 2831 Uses mhash() extension if available

  • return: HMAC Digest string
string hmac_md5 (string $data, [string $key = ''])
  • string $data: Data to apply hash function to.
  • string $key: Optional key, which, if supplied, will be used to calculate data's HMAC.
is_logged_in (line 39)

Check if user has previously logged in to the SquirrelMail session. If user has not logged in, execution will stop inside this function.

  • return: A positive value is returned if user has previously logged in successfully.
int is_logged_in ()

Documentation generated on Sat, 07 Oct 2006 16:29:56 +0300 by phpDocumentor 1.3.0RC6