Zend\Authentication\Result
Synopsis
class Result
{
- // constants
- const FAILURE = 0;
- const FAILURE_IDENTITY_NOT_FOUND = 1;
- const FAILURE_IDENTITY_AMBIGUOUS = 2;
- const FAILURE_CREDENTIAL_INVALID = 3;
- const FAILURE_UNCATEGORIZED = 4;
- const SUCCESS = 1;
- // methods
- public void __construct()
- public bool isValid()
- public int getCode()
- public mixed getIdentity()
- public array getMessages()
Constants
Name | Value |
---|---|
FAILURE | 0 |
FAILURE_IDENTITY_NOT_FOUND | 1 |
FAILURE_IDENTITY_AMBIGUOUS | 2 |
FAILURE_CREDENTIAL_INVALID | 3 |
FAILURE_UNCATEGORIZED | 4 |
SUCCESS | 1 |
Members
protected
- $code
—
int
Authentication result code - $identity
—
mixed
The identity used in the authentication attempt - $messages
—
array
An array of string reasons why the authentication attempt was unsuccessful
Methods
public
- __construct() — Sets the result code, identity, and failure messages
- getCode() — getCode() - Get the result code for this authentication attempt
- getIdentity() — Returns the identity used in the authentication attempt
- getMessages() — Returns an array of string reasons why the authentication attempt was unsuccessful
- isValid() — Returns whether the result represents a successful authentication attempt