flex.messaging.security
Class LoginManager

java.lang.Object
  extended by flex.messaging.security.LoginManager
All Implemented Interfaces:
FlexComponent, FlexConfigurable

public class LoginManager
extends Object
implements FlexComponent

Much of this logic has been taken from the Flash Remoting Gateway.

Since each application server manages sessions, users and security differently, a separate LoginCommand needs to be written for each server.


Field Summary
static String LOG_CATEGORY
          Log category for LoginManager.
 
Constructor Summary
LoginManager()
          Creates a new LoginManager instance.
 
Method Summary
 void checkConstraint(SecurityConstraint constraint)
           
 boolean checkRoles(Principal principal, List roles)
           
 LoginCommand getLoginCommand()
          Returns the login command used.
 void initialize(String id, ConfigMap configMap)
          Implements FlexComponents.initialize.
 boolean isPerClientAuthentication()
          Returns whether per client authentication is enabled or not.
 boolean isStarted()
          Implements FlexComponent.isStarted.
 void login(String username, Object credentials)
          Perform login with username and credentials.
 void logout()
          Perform logout.
 void setLoginCommand(LoginCommand loginCommand)
          Sets the login command used.
 void setPerClientAuthentication(boolean perClientAuthentication)
          Sets whether per client authentication is enabled or not.
 void start()
          Implements FlexComponent.start.
 void stop()
          Implements FlexComponents.stop.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_CATEGORY

public static final String LOG_CATEGORY
Log category for LoginManager.

See Also:
Constant Field Values
Constructor Detail

LoginManager

public LoginManager()
Creates a new LoginManager instance.

Method Detail

initialize

public void initialize(String id,
                       ConfigMap configMap)
Implements FlexComponents.initialize. This is no-op for LoginManager as it does not have an id and all its properties are directly settable.

Specified by:
initialize in interface FlexConfigurable

start

public void start()
Implements FlexComponent.start. Starts the LoginManager.

Specified by:
start in interface FlexComponent

stop

public void stop()
Implements FlexComponents.stop. Stops the LoginManager.

Specified by:
stop in interface FlexComponent

isPerClientAuthentication

public boolean isPerClientAuthentication()
Returns whether per client authentication is enabled or not.

Returns:
true if per client authentication is enabled; otherwise false.

setPerClientAuthentication

public void setPerClientAuthentication(boolean perClientAuthentication)
Sets whether per client authentication is enabled or not.

Parameters:
perClientAuthentication - true if per client authentication is enabled; otherwise false.

isStarted

public boolean isStarted()
Implements FlexComponent.isStarted. Returns whether the LoginManager is started or not.

Specified by:
isStarted in interface FlexComponent
Returns:
true if the LoginManager is started; otherwise false.

getLoginCommand

public LoginCommand getLoginCommand()
Returns the login command used.

Returns:
loginCommand The login command used.

setLoginCommand

public void setLoginCommand(LoginCommand loginCommand)
Sets the login command used.

Parameters:
loginCommand - The login command to set.

login

public void login(String username,
                  Object credentials)
Perform login with username and credentials.

Parameters:
username - Username to use to login.
credentials - Credentials to use to login.

logout

public void logout()
Perform logout.


checkConstraint

public void checkConstraint(SecurityConstraint constraint)

checkRoles

public boolean checkRoles(Principal principal,
                          List roles)


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/security/LoginManager.html