flex.messaging.security
Class AppServerLoginCommand

java.lang.Object
  extended by flex.messaging.security.AppServerLoginCommand
All Implemented Interfaces:
LoginCommand
Direct Known Subclasses:
JRunLoginCommand, OracleLoginCommand, TomcatLoginCommand, WeblogicLoginCommand, WebSphereLoginCommand

public abstract class AppServerLoginCommand
extends Object
implements LoginCommand

This class implements LoginCommand and doAuthorization in way that should work by default if authorization logged a user into the J2EE appserver. doAuthorization uses isUserInRole.


Constructor Summary
AppServerLoginCommand()
           
 
Method Summary
 boolean doAuthorization(Principal principal, List roles)
          The gateway calls this method to perform programmatic authorization.
 void start(javax.servlet.ServletConfig config)
          Called to initialize a login command prior to authentication/authorization requests.
 void stop()
          Called to free up resources used by the login command.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface flex.messaging.security.LoginCommand
doAuthentication, logout
 

Constructor Detail

AppServerLoginCommand

public AppServerLoginCommand()
Method Detail

start

public void start(javax.servlet.ServletConfig config)
Description copied from interface: LoginCommand
Called to initialize a login command prior to authentication/authorization requests.

Specified by:
start in interface LoginCommand

stop

public void stop()
Description copied from interface: LoginCommand
Called to free up resources used by the login command.

Specified by:
stop in interface LoginCommand

doAuthorization

public boolean doAuthorization(Principal principal,
                               List roles)
                        throws SecurityException
Description copied from interface: LoginCommand
The gateway calls this method to perform programmatic authorization.

A typical implementation would simply iterate over the supplied roles and check that atleast one of the roles returned true from a call to HttpServletRequest.isUserInRole(String role).

Specified by:
doAuthorization in interface LoginCommand
Parameters:
principal - The principal being checked for authorization
roles - A List of role names to check, all members should be strings
Throws:
SecurityException


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/AppServerLoginCommand.html