org.silex.core.Authentication

mx.core.UIObject
org.silex.core.Authentication

This class is used to authenticate users it uses amfphp in the repository : /trunk/core/Authentication.as

Version

1

Author

Alexandre Hoyau

Summary
org.silex.core.AuthenticationThis class is used to authenticate users it uses amfphp in the repository : /trunk/core/Authentication.as
Variables
silex_ptrReference to silex main Api object (org.silex.core.Api).
currentLoginStore user login.
currentPasswordStore user password.
phpSessionTimerIdid of the timer used to keep php session active
Functions
AuthenticationConstructor.
isLoggedInIs the user logged in?
loginLogin the user to allow access to administration functionalities.
wakeUpPhpSessionwake up php session
logoutLogout the user to prevent access to administration functionalities.

Variables

silex_ptr

private var silex_ptr: org.silex.core.Api

Reference to silex main Api object (org.silex.core.Api).

currentLogin

var currentLogin: String

Store user login.

currentPassword

var currentPassword: String

Store user password.

phpSessionTimerId

var phpSessionTimerId: Number

id of the timer used to keep php session active

=0 when logged in

Functions

Authentication

function Authentication(api: org.silex.core.Api)

Constructor.  Initialize context menu to display the about item.

Parameters

param api reference to silex main Api object (org.silex.core.Api)

isLoggedIn

function isLoggedIn():Boolean

Is the user logged in?

Returns

true if the user is logged in, false otherwise

login

function login(login_str: String,
pass_str: String,
callback/*: Function*/,
rememberLogin/*: Boolean*/)

Login the user to allow access to administration functionalities.  Called by org.silex.core.Application loginCallback.

Parameters

param login_str The login provided by the user
param pass_str The password provided by the user
param callback A callback function called when the operation is done.  This function must have 1 parameter which is a boolean and has the value of the success state. 

wakeUpPhpSession

function wakeUpPhpSession()

wake up php session

logout

function logout(callback: Function)

Logout the user to prevent access to administration functionalities.

Parameters

param callback A callback function called when the operation is done.  This function must have 1 parameter which is a boolean and has the value of the success state. 
private var silex_ptr: org.silex.core.Api
Reference to silex main Api object (org.silex.core.Api).
var currentLogin: String
Store user login.
var currentPassword: String
Store user password.
var phpSessionTimerId: Number
id of the timer used to keep php session active
function Authentication(api: org.silex.core.Api)
Constructor.
function isLoggedIn():Boolean
Is the user logged in?
function login(login_str: String,
pass_str: String,
callback/*: Function*/,
rememberLogin/*: Boolean*/)
Login the user to allow access to administration functionalities.
function wakeUpPhpSession()
wake up php session
function logout(callback: Function)
Logout the user to prevent access to administration functionalities.