Ubiquity
2.0.3
php rapid development framework
|
Public Member Functions | |
__construct () | |
index () | |
_getBaseRoute () | |
To override Return the base route for this Auth controller. More... | |
isValid ($action) | |
noAccess ($urlParts) | |
Action called when the user does not have access rights to a requested resource. More... | |
connect () | |
Override to implement the complete connection procedure. More... | |
badLogin () | |
Default Action for invalid creditentials. More... | |
terminate () | |
Logout action Terminate the session and display a logout message. More... | |
_disConnected () | |
info () | |
Action displaying the logged user information if _displayInfoAsString returns true, use _infoUser var in views to display user info. More... | |
message ($type, $header, $body, $icon="info", $id=null) | |
_getUserSessionKey () | |
To override for defining user session key, default : "activeUser". More... | |
_getActiveUser () | |
To override for getting active user, default : USession::get("activeUser") More... | |
_checkConnection () | |
_isValidUser () | |
return boolean true if activeUser is valid More... | |
_displayInfoAsString () | |
Override to define if info is displayed as string if set to true, use _infoUser var in views to display user info. More... | |
_checkConnectionTimeout () | |
_getLoginInputName () | |
_getPasswordInputName () | |
_getBodySelector () | |
_setNoAccessMsg ($content, $title=NULL, $type=NULL, $icon=null) | |
Sets the default noAccess message Default : "You are not authorized to access the page <b>{url}</b> !". More... | |
_setLoginCaption ($_loginCaption) | |
_autoConnect () | |
Auto connect the user. More... | |
forgetConnection () | |
Deletes the cookie for auto connection and returns to index. More... | |
![]() | |
initialize () | |
finalize () | |
![]() | |
index () | |
Default action. More... | |
__construct () | |
Constructor initialize $view variable. More... | |
initialize () | |
Method called before each action Can be override in derived class. More... | |
finalize () | |
Method called after each action Can be override in derived class. More... | |
loadView ($viewName, $pData=NULL, $asString=false) | |
Loads the view $viewName possibly passing the variables $pdata. More... | |
loadDefaultView ($pData=NULL, $asString=false) | |
Loads the default view (controllerName/actionName) possibly passing the variables $pdata. More... | |
getDefaultViewName () | |
Returns the default view name for this controller/action i.e ControllerName/actionName.html for the action actionName in ControllerName. More... | |
isValid ($action) | |
Returns True if access to the controller is allowed To be override in sub classes. More... | |
onInvalidControl () | |
Called if isValid () returns false To be override in sub classes. More... | |
forward ($controller, $action="index", $params=array(), $initialize=false, $finalize=false) | |
Loads the controller $controller and calls its $action method by passing the parameters $params. More... | |
redirectToRoute ($routeName, $parameters=[], $initialize=false, $finalize=false) | |
Redirect to a route by its name. More... | |
getView () | |
Protected Member Functions | |
noAccessMessage (FlashMessage $fMessage) | |
Override for modifying the noAccess message. More... | |
attemptsNumberMessage (FlashMessage $fMessage, $attempsCount) | |
Override for modifying attempts message You can use {_timer} and {_attemptsCount} variables in message content. More... | |
_connect () | |
Processes the data posted by the login form Have to return the connected user instance. More... | |
onConnect ($connected) | |
onBadCreditentials () | |
To override for defining a new action when creditentials are invalid. More... | |
noAttempts () | |
badLoginMessage (FlashMessage $fMessage) | |
To override for modifying the bad login message. More... | |
terminateMessage (FlashMessage $fMessage) | |
To override for modifying the logout message. More... | |
disconnectedMessage (FlashMessage $fMessage) | |
To override for modifying the disconnect message. More... | |
fMessage (FlashMessage $fMessage, $id=null) | |
getOriginalURL () | |
attemptsNumber () | |
To override Returns the maximum number of allowed login attempts. More... | |
attemptsTimeout () | |
To override Returns the time before trying to connect again Effective only if attemptsNumber return a number. More... | |
getFiles () | |
To override for changing view files. More... | |
loginLabel () | |
passwordLabel () | |
rememberCaption () | |
getViewVars ($viewname) | |
rememberMe ($connected) | |
Saves the connected user identifier in a cookie. More... | |
getCookieUser () | |
Returns the cookie for auto connection. More... | |
toCookie ($connected) | |
Returns the value from connected user to save it in the cookie for auto connection. More... | |
fromCookie ($cookie) | |
Loads the user from database using the cookie value. More... | |
Protected Attributes | |
$authFiles | |
$_controller | |
$_action | |
$_actionParams | |
$_noAccessMsg | |
$_loginCaption | |
$_attemptsSessionKey ="_attempts" | |
![]() | |
$headerView ="@framework/main/vHeader.html" | |
$footerView ="@framework/main/vFooter.html" | |
![]() | |
$view | |
Private Member Functions | |
authLoadView ($viewName, $vars=[]) | |
_getFiles () | |
Definition at line 19 of file AuthController.php.
__construct | ( | ) |
Definition at line 31 of file AuthController.php.
_autoConnect | ( | ) |
Auto connect the user.
Definition at line 422 of file AuthController.php.
_checkConnection | ( | ) |
Definition at line 301 of file AuthController.php.
_checkConnectionTimeout | ( | ) |
Definition at line 327 of file AuthController.php.
|
abstractprotected |
Processes the data posted by the login form Have to return the connected user instance.
_disConnected | ( | ) |
Definition at line 221 of file AuthController.php.
_displayInfoAsString | ( | ) |
Override to define if info is displayed as string if set to true, use _infoUser var in views to display user info.
Definition at line 323 of file AuthController.php.
_getActiveUser | ( | ) |
To override for getting active user, default : USession::get("activeUser")
Definition at line 279 of file AuthController.php.
_getBaseRoute | ( | ) |
To override Return the base route for this Auth controller.
Definition at line 60 of file AuthController.php.
_getBodySelector | ( | ) |
Definition at line 354 of file AuthController.php.
|
private |
Definition at line 331 of file AuthController.php.
_getLoginInputName | ( | ) |
Definition at line 338 of file AuthController.php.
_getPasswordInputName | ( | ) |
Definition at line 346 of file AuthController.php.
_getUserSessionKey | ( | ) |
To override for defining user session key, default : "activeUser".
Definition at line 271 of file AuthController.php.
|
abstract |
return boolean true if activeUser is valid
_setLoginCaption | ( | $_loginCaption | ) |
string | $_loginCaption |
Definition at line 372 of file AuthController.php.
_setNoAccessMsg | ( | $content, | |
$title = NULL , |
|||
$type = NULL , |
|||
$icon = null |
|||
) |
Sets the default noAccess message Default : "You are not authorized to access the page <b>{url}</b> !".
string | $content | |
string | $title | |
string | $type | |
string | $icon |
Definition at line 366 of file AuthController.php.
|
protected |
To override Returns the maximum number of allowed login attempts.
Definition at line 287 of file AuthController.php.
|
protected |
Override for modifying attempts message You can use {_timer} and {_attemptsCount} variables in message content.
FlashMessage | $fMessage | |
int | $attempsCount |
Definition at line 100 of file AuthController.php.
|
protected |
To override Returns the time before trying to connect again Effective only if attemptsNumber return a number.
Definition at line 297 of file AuthController.php.
|
private |
Definition at line 197 of file AuthController.php.
badLogin | ( | ) |
Default Action for invalid creditentials.
Definition at line 144 of file AuthController.php.
|
protected |
To override for modifying the bad login message.
FlashMessage | $fMessage |
Definition at line 193 of file AuthController.php.
connect | ( | ) |
Override to implement the complete connection procedure.
Definition at line 107 of file AuthController.php.
|
protected |
To override for modifying the disconnect message.
FlashMessage | $fMessage |
Definition at line 242 of file AuthController.php.
|
protected |
Definition at line 255 of file AuthController.php.
forgetConnection | ( | ) |
Deletes the cookie for auto connection and returns to index.
Definition at line 434 of file AuthController.php.
|
protected |
Loads the user from database using the cookie value.
string | $cookie |
Definition at line 415 of file AuthController.php.
|
protected |
Returns the cookie for auto connection.
Definition at line 399 of file AuthController.php.
|
protected |
To override for changing view files.
Definition at line 315 of file AuthController.php.
|
protected |
Definition at line 263 of file AuthController.php.
|
protected |
Definition at line 380 of file AuthController.php.
index | ( | ) |
Definition at line 40 of file AuthController.php.
info | ( | ) |
Action displaying the logged user information if _displayInfoAsString returns true, use _infoUser var in views to display user info.
Definition at line 251 of file AuthController.php.
|
final |
Definition at line 67 of file AuthController.php.
|
protected |
Definition at line 342 of file AuthController.php.
message | ( | $type, | |
$header, | |||
$body, | |||
$icon = "info" , |
|||
$id = null |
|||
) |
Definition at line 259 of file AuthController.php.
noAccess | ( | $urlParts | ) |
Action called when the user does not have access rights to a requested resource.
array | string | $urlParts |
Definition at line 75 of file AuthController.php.
|
protected |
Override for modifying the noAccess message.
FlashMessage | $fMessage |
Definition at line 90 of file AuthController.php.
|
protected |
Definition at line 167 of file AuthController.php.
|
protected |
To override for defining a new action when creditentials are invalid.
Definition at line 137 of file AuthController.php.
|
abstractprotected |
object | $connected |
|
protected |
Definition at line 350 of file AuthController.php.
|
protected |
Definition at line 376 of file AuthController.php.
|
protected |
Saves the connected user identifier in a cookie.
object | $connected |
Definition at line 388 of file AuthController.php.
terminate | ( | ) |
Logout action Terminate the session and display a logout message.
Definition at line 213 of file AuthController.php.
|
protected |
To override for modifying the logout message.
FlashMessage | $fMessage |
Definition at line 234 of file AuthController.php.
|
protected |
Returns the value from connected user to save it in the cookie for auto connection.
object | $connected |
Definition at line 407 of file AuthController.php.
|
protected |
Definition at line 25 of file AuthController.php.
|
protected |
Definition at line 26 of file AuthController.php.
|
protected |
Definition at line 29 of file AuthController.php.
|
protected |
Definition at line 24 of file AuthController.php.
|
protected |
Definition at line 28 of file AuthController.php.
|
protected |
Definition at line 27 of file AuthController.php.
|
protected |
Definition at line 23 of file AuthController.php.