package Default

 Methods

Sets the result code, identity, and failure messages

__construct(integer $code, mixed $identity, array $messages = array()

Parameters

$code

integer

$identity

mixed

$messages

array

getCode() - Get the result code for this authentication attempt

getCode() : integer

Returns

integer

Returns the identity used in the authentication attempt

getIdentity() : mixed

Returns

mixed

Returns an array of string reasons why the authentication attempt was unsuccessful

getMessages() : array

If authentication was successful, this method returns an empty array.

Returns

array

Returns whether the result represents a successful authentication attempt

isValid() : boolean

Returns

boolean

 Properties

 

Authentication result code

$code : integer

Default

 

The identity used in the authentication attempt

$identity : mixed

Default

 

An array of string reasons why the authentication attempt was unsuccessful

$messages : array

Default

If authentication was successful, this should be an empty array.

 Constants

 

General Failure

FAILURE = 0 
 

Failure due to invalid credential being supplied.

FAILURE_CREDENTIAL_INVALID = -3 
 

Failure due to identity being ambiguous.

FAILURE_IDENTITY_AMBIGUOUS = -2 
 

Failure due to identity not being found.

FAILURE_IDENTITY_NOT_FOUND = -1 
 

Failure due to uncategorized reasons.

FAILURE_UNCATEGORIZED = -4 
 

Authentication success.

SUCCESS = 1