SecurityService Class
Service for managing user access
Item Index
Methods
- authenticateSession static
- encrypt
- generatePassword static
- getPrincipal static
- getRoleName
- getRoleNames
- getRoleToDisplayNameMap static
- isAuthenticated
- isAuthorized static
Properties
- ACCESS_ static
- ACCESS_ static
- ACCESS_ADMINISTRATOR static
- ACCESS_EDITOR static
- ACCESS_MANAGING_EDITOR static
- ACCESS_USER static
- ACCESS_WRITER static
- PASSWORD_CHARS static
- ROLE_VAL_TO_NAME static
- SYSTEM_ROLES static
Methods
authenticateSession
(
static
-
session
-
options
-
authenticator
-
cb
Authenticates a session
Parameters:
-
session
Object -
options
Object -
authenticator
Authentication -
cb
Function
encrypt
(
-
valStr #return
One way encrypt a string
Parameters:
-
valStr #return
String{String} Encrypted string
generatePassword
(
static
-
[length=8]
Parameters:
-
[length=8]
Integer optional
getPrincipal
(
Object
static
-
session
Parameters:
-
session
Object
Returns:
Object:
The authenticated user principal or NULL if not authenticated
getRoleName
(
-
accessLevel
Returns the constant name of an access level number
Parameters:
-
accessLevel
Number
getRoleNames
(
Array
-
ls
Retrieves the localized names of access levels as an array
Parameters:
-
ls
LocalizationThe localization service
Returns:
Array:
getRoleToDisplayNameMap
(
Object
static
-
ls
Provides a hash of the default roles to their translated display name
Parameters:
-
ls
Localization
Returns:
Object:
isAuthenticated
(
-
session
Check to see if a session is authentic
Parameters:
-
session
Object
isAuthorized
(
static
-
session
-
requirements
Check to see if a user meets security requirements
Parameters:
-
session
Object[description]
-
requirements
ObjectObject containing access requirements
Properties
ACCESS_
Integer
static
ACCESS_
Integer
static
ACCESS_ADMINISTRATOR
Integer
static
ACCESS_EDITOR
Integer
static
ACCESS_MANAGING_EDITOR
Integer
static
ACCESS_USER
Integer
static
ACCESS_WRITER
Integer
static
PASSWORD_CHARS
Array
private
static
ROLE_VAL_TO_NAME
Array
private
static
SYSTEM_ROLES
Array
static
Provides an array of all of the system roles. It provides their numeric value as well as the unique string key