PHP Class CHAP, gitblog

Schema: response = HMAC( a, nonce ) a = HMAC( shadow, opaque ) shadow = SHA1( username ":" context ":" password ) opaque = H( gb::$secret ) nonce = H( timeslice [context] client-addr ) H = HMAC( $data, gb::$secret ) HMAC = SHA-1-HMAC
Datei anzeigen Open project: rsms/gitblog Class Usage Examples

Public Properties

Property Type Description
$allow_plain
$context
$cookie_name # 1 week
$preshadowed
$refresh_cookie # set to false to disable cookies
$ttl
$users

Public Methods

Method Description
__construct ( $users, $context = '', $preshadowed = true, $cookie_name = 'gb-chap' )
auth_handshake ( $username, $response, $cookie = false )
auth_plain ( $username, $password, $shadow = false, $cookie = false )
authenticate ( )
deauthorize ( )
get_cookie ( )
h ( $s )
nonce ( )
opaque ( )
set_cookie ( $username, $response, $shadow = false, $cookie = false )
shadow ( $username, $password, $context = '' )

Method Details

__construct() public method

public __construct ( $users, $context = '', $preshadowed = true, $cookie_name = 'gb-chap' )

auth_handshake() public method

public auth_handshake ( $username, $response, $cookie = false )

auth_plain() public method

public auth_plain ( $username, $password, $shadow = false, $cookie = false )

authenticate() public method

public authenticate ( )

deauthorize() public method

public deauthorize ( )

h() static public method

static public h ( $s )

nonce() public method

public nonce ( )

opaque() static public method

static public opaque ( )

shadow() static public method

static public shadow ( $username, $password, $context = '' )

Property Details

$allow_plain public_oe property

public $allow_plain

$context public_oe property

public $context

$preshadowed public_oe property

public $preshadowed

$ttl public_oe property

public $ttl

$users public_oe property

public $users