Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.24 KB

Authentication.md

File metadata and controls

51 lines (33 loc) · 1.24 KB

Authentication

Utility class to get and manipulate session. To use with On Mobile App Authentication database method.

Usage

in On Mobile App Authentication wrap the first input parameters

$auth:=MobileAppServer.Authentication.new($1) // $1 Informations provided by mobile application

Then you can have some information about mobile applications and session or even have a special authentication like sending email

Get application id

$myAppId:=$auth.getAppId()

Get session information

Get the File associated to the session

$currentSessionFile:=$auth.getSessionFile()

Get the session information as object

$currentSessionObject:=$auth.getSessionObject()

Modify current session

Setting the status to "pending" ie. not validated yet.

$currentSessionObject.status:="pending"
$currentSessionObject.save() // save to File on disk

Checking authentication using a confirmation email

$0:=$auth.confirmEmail()

You must configure first your SMTP server to send emails - more detail available here