Class CBaseUserIdentity
CBaseUserIdentity is a base class implementing IUserIdentity.
CBaseUserIdentity implements the scheme for representing identity information that needs to be persisted. It also provides the way to represent the authentication errors.
Derived classes should implement IUserIdentity::authenticate() and
IUserIdentity::getId() that are required by the IUserIdentity
interface.
- CComponent
-
CBaseUserIdentity
implements
IUserIdentity
Direct known subclasses
CUserIdentityIndirect known subclasses
UserIdentityPackage: system\web\auth
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/web/auth/CBaseUserIdentity.php
public
mixed
|
|
public
string
|
|
public
array
|
#
getPersistentStates( )
Returns the identity states that should be persisted. This method is required
by |
public
|
|
public
boolean
|
#
getIsAuthenticated( )
Returns a value indicating whether the identity is authenticated. This method
is required by |
public
mixed
|
|
public
|
|
public
|
authenticate()
|
integer |
ERROR_NONE
|
0 |
|
integer |
ERROR_USERNAME_INVALID
|
1 |
|
integer |
ERROR_PASSWORD_INVALID
|
2 |
|
integer |
ERROR_UNKNOWN_IDENTITY
|
100 |
public
integer
|
$errorCode | |
#
the authentication error code. If there is an error, the error code will be
non-zero. Defaults to 100, meaning unknown identity. Calling |
public
string
|
$errorMessage | '' |
#
the authentication error message. Defaults to empty. |
public
mixed
|
$id |
#
A value that uniquely represents the identity (e.g. primary key value). The default implementation simply returns name. |
public
string
|
$name |
#
The display name for the identity. The default implementation simply returns empty string. |
public
array
|
$persistentStates |
#
The identity states that should be persisted. |
public
boolean
|
$isAuthenticated |
#
Whether the authentication is successful. |