Child pages
  • Security

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Div
styledisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

Enter additional information related to this 'class' inside the {div} macro with 'id=description'

Div
iddescription



HTML Table
id
classservoy sReturnTypes
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Return Types
Table Row (tr)
Table Cell (td)
 



HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
Object
Table Cell (td)
authenticate(authenticator_solution, method, credentials)
Authenticate the given credentials against the mobile service solution.
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
getUserName()
returns the current logged in username of that is used when doing a sync.
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
logout()
Clears the current credentials that the user specified when doing a sync.



HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idauthenticate-String_String_ObjectArray
Table Row (tr)
idname
Table Cell (td)

authenticate

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Object
Span
stylefont-weight: bold;
authenticate
Span
(authenticator_solution, method, credentials)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Authenticate the given credentials against the mobile service solution. First two parameters are not used in mobile solution, just the credentials.
It will set the credentials and then do a sync call to the server.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} authenticator_solution - authenticator solution installed on the Servoy Server, null for servoy built-in authentication
{String} method - authenticator method, null for servoy built-in authentication
{Object[]} credentials - array whose elements are passed as arguments to the authenticator method, in case of servoy built-in authentication this should be [username, password]
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
Object - authentication result from authenticator solution or boolean in case of servoy built-in authentication
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
// method will return null in mobile client, the same flow as for default login page will happen after calling this method
security.authenticate(null, null, ['myusername', 'mypassword']);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetUserName
Table Row (tr)
idname
Table Cell (td)

getUserName

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getUserName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
returns the current logged in username of that is used when doing a sync.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
String - the user name
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var username = security.getUserName();
if (username != null) {
  // user is logged in
}
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idlogout
Table Row (tr)
idname
Table Cell (td)

logout

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
void
Span
stylefont-weight: bold;
logout
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Clears the current credentials that the user specified when doing a sync. When the next sync happens the login form will be shown.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
void
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
security.logout();
plugins.mobile.sync();
Table Row (tr)
classlastDetailRow
Table Cell (td)