Packageorg.granite.tide.seam.security
Classpublic class Identity
InheritanceIdentity Inheritance Component Inheritance mx.utils.ObjectProxy
ImplementsIIdentity

Implementation of the identity component for Seam services.
Integrates with the server-side identity component of Seam.

The basic way of using it is by populating username/password and calling login :
      identity.username = 'john';
      identity.password = 'doe';
      identity.login();
      



Public Properties
 PropertyDefined by
  context : BaseContext
[write-only]
Identity
  loggedIn : Boolean
Logged in
Identity
 Inheritedmeta_context : BaseContext
Component
 Inheritedmeta_name : String
Component
 Inheritedmeta_remoteObject : RemoteObject
Component
 Inheritedmeta_templateObject : Object
Component
  password : String
[write-only] Password
Identity
  username : String
User name
Identity
Protected Properties
 PropertyDefined by
 Inherited_context : BaseContext
Component
 Inheritedobject : Object
Component
Public Methods
 MethodDefined by
  
Clear the security cache
Identity
  
hasPermission(target:Object, action:String, resultHandler:Function = null, faultHandler:Function = null):Boolean
Check permission for the specified target and action
Identity
  
hasRole(roleName:String, resultHandler:Function = null, faultHandler:Function = null):Boolean
Check role permission for the specified role
Identity
  
[static]
Identity
  
isLoggedIn(resultHandler:Function = null, faultHandler:Function = null):void
Triggers a remote call to check is user is currently logged in Can be used at application startup to handle browser refresh cases
Identity
  
login(resultHandler:Function = null, faultHandler:Function = null, charset:String = null):void
Triggers a login request
Identity
  
logout():void
Triggers a logout request
Identity
 Inherited
meta_clear():void
Component
  
meta_init(componentName:String, context:BaseContext):void
Identity
 Inherited
meta_propertyResultHandler(propName:String, event:ResultEvent):void
Component
Protected Methods
 MethodDefined by
 Inherited
callProperty(name:*, ... args):*
Component
 Inherited
getInternalProperty(propertyName:*):*
Component
 Inherited
getProperty(propertyName:*):*
Component
 Inherited
meta_internalSetProperty(propName:String, value:Boolean, addUpdate:Boolean = false, proxy:* = true):*
Component
 Inherited
setInternalProperty(propertyName:*, value:*):void
Component
 Inherited
setProperty(propertyName:*, value:*):void
Component
Property detail
contextproperty
context:BaseContext  [write-only]

This property can be used as the source for data binding.

Implementation
    public function set context(value:BaseContext):void
loggedInproperty 
loggedIn:Boolean  [read-write]

Logged in

This property can be used as the source for data binding.

Implementation
    public function get loggedIn():Boolean
    public function set loggedIn(value:Boolean):void
passwordproperty 
password:String  [write-only]

Password

This property can be used as the source for data binding.

Implementation
    public function set password(value:String):void
usernameproperty 
username:String  [read-write]

User name

This property can be used as the source for data binding.

Implementation
    public function get username():String
    public function set username(value:String):void
Method detail
clearSecurityCache()method
public function clearSecurityCache():void

Clear the security cache

hasPermission()method 
public function hasPermission(target:Object, action:String, resultHandler:Function = null, faultHandler:Function = null):Boolean

Check permission for the specified target and action

Parameters
target:Object — target object
 
action:String — requested action
 
resultHandler:Function (default = null) — result handler
 
faultHandler:Function (default = null) — fault handler

Returns
Boolean — true is permission granted
hasRole()method 
public function hasRole(roleName:String, resultHandler:Function = null, faultHandler:Function = null):Boolean

Check role permission for the specified role

Parameters
roleName:String — role name
 
resultHandler:Function (default = null) — result handler
 
faultHandler:Function (default = null) — fault handler

Returns
Boolean — true is role allowed
instance()method 
public static function instance():Identity

Returns
Identity
isLoggedIn()method 
public function isLoggedIn(resultHandler:Function = null, faultHandler:Function = null):void

Triggers a remote call to check is user is currently logged in Can be used at application startup to handle browser refresh cases

Parameters
resultHandler:Function (default = null) — optional result handler
 
faultHandler:Function (default = null) — optional fault handler
login()method 
public function login(resultHandler:Function = null, faultHandler:Function = null, charset:String = null):void

Triggers a login request

Parameters
resultHandler:Function (default = null) — optional result handler
 
faultHandler:Function (default = null) — optional fault handler
 
charset:String (default = null)
logout()method 
public function logout():void

Triggers a logout request

meta_init()method 
public override function meta_init(componentName:String, context:BaseContext):voidParameters
componentName:String
 
context:BaseContext