PHP Class BcAuthComponent

Binds access control with user authentication and session management.
Inheritance: extends AuthComponent
Show file Open project: baserproject/basercms Class Usage Examples

Public Properties

Property Type Description
$serial string 個体識別ID

Public Methods

Method Description
deleteSerial ( ) : boolean 個体識別IDを削除する
getSerial ( ) : string 個体識別IDを取得
login ( array $user = null ) : boolean Log a user in. If a $user is provided that data will be stored as the logged in user. If $user is empty or not specified, the request will be used to identify a user. If the identification was successful, the user record is written to the session key specified in AuthComponent::$sessionKey. Logging in will also change the session id in order to help mitigate session replays.
logout ( ) : string Logs a user out, and returns the login action to redirect to.
relogin ( ) 再ログインを実行する
saveSerial ( ) : boolean 個体識別IDを保存する
setSessionKey ( string $sessionKey ) セッションキーをセットする

Method Details

deleteSerial() public method

個体識別IDを削除する
public deleteSerial ( ) : boolean
return boolean

getSerial() public method

個体識別IDを取得
public getSerial ( ) : string
return string

login() public method

Log a user in. If a $user is provided that data will be stored as the logged in user. If $user is empty or not specified, the request will be used to identify a user. If the identification was successful, the user record is written to the session key specified in AuthComponent::$sessionKey. Logging in will also change the session id in order to help mitigate session replays.
public login ( array $user = null ) : boolean
$user array Either an array of user data, or null to identify a user using the current request.
return boolean True on login success, false on failure

logout() public method

Triggers the logout() method of all the authenticate objects, so they can perform custom logout logic. AuthComponent will remove the session data, so there is no need to do that in an authentication object. Logging out will also renew the session id. This helps mitigate issues with session replays.
public logout ( ) : string
return string AuthComponent::$logoutRedirect

relogin() public method

return boolean
public relogin ( )

saveSerial() public method

個体識別IDを保存する
public saveSerial ( ) : boolean
return boolean

setSessionKey() public method

セッションキーをセットする
public setSessionKey ( string $sessionKey )
$sessionKey string

Property Details

$serial public property

個体識別ID
public string $serial
return string