FluorineFx.NET

LoginCommand

The fully qualified class name of the implementation of this interface is specified:
- in the flex service configuration (<security> section) file if present
- in the gateway configuration's security section (Flash remoting without service configuration file)

 

IPrincipal DoAuthentication(string username, Hashtable credentials)
The gateway calls this method to perform programmatic, custom authentication. The credentials are passed as a Hashtable to allow for extra properties to be passed in the future. For now, only a "password" property is sent.

bool DoAuthorization(IPrincipal principal, IList roles)
The gateway calls this method to perform programmatic authorization.

A typical implementation would simply iterate over the supplied roles:
foreach(string role in roles )
{
   if( principal.IsInRole(role) )
      return true;
}
return false;

 

Note: the GenericLoginCommand base class already implements this method for you.

 

bool Logout(IPrincipal principal)
Attempts to log out the current user out from their session. The Principal parameter can be null in the current implementation.