flex.messaging.security
Interface LoginCommand


public interface LoginCommand

The class name of the implementation of this interface is configured in the gateway configuration's security section and is instantiated using reflection on servlet initialization.


Method Summary
 Principal doAuthentication(String username, Object credentials)
          The gateway calls this method to perform programmatic, custom authentication.
 boolean doAuthorization(Principal principal, List roles)
          The gateway calls this method to perform programmatic authorization.
 boolean logout(Principal principal)
          Attempts to log a user out from their session.
 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.
 

Method Detail

start

void start(javax.servlet.ServletConfig config)
Called to initialize a login command prior to authentication/authorization requests.


stop

void stop()
Called to free up resources used by the login command.


doAuthentication

Principal doAuthentication(String username,
                           Object credentials)
The gateway calls this method to perform programmatic, custom authentication.

The credentials are passed as a Map to allow for extra properties to be passed in the future. For now, only a "password" property is sent.

Parameters:
username - The principal being authenticated
credentials - A map, typically with string keys and values - holds, for example, a password

doAuthorization

boolean doAuthorization(Principal principal,
                        List roles)
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).

Parameters:
principal - The principal being checked for authorization
roles - A List of role names to check, all members should be strings

logout

boolean logout(Principal principal)
Attempts to log a user out from their session. NOTE: May not be possible on all application servers.

Parameters:
principal - The principal to logout.


Copyright © 2007 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/livecycle/es/sdkHelp/programmer/lcdsjavadoc/flex/messaging/security/LoginCommand.html