com.funambol.email.security
Class EmailOfficer

java.lang.Object
  extended by com.funambol.email.security.EmailOfficer
All Implemented Interfaces:
com.funambol.framework.security.Officer, java.io.Serializable

public class EmailOfficer
extends java.lang.Object
implements com.funambol.framework.security.Officer, java.io.Serializable

This is an implementation of the Officier interface. It always authenticates and authorizes users and resource accesses.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.funambol.framework.security.Officer
com.funambol.framework.security.Officer.AuthStatus
 
Field Summary
protected  com.funambol.framework.logging.FunambolLogger log
           
protected  com.funambol.framework.server.store.PersistentStore ps
           
protected  com.funambol.server.admin.UserManager userManager
           
 
Constructor Summary
EmailOfficer()
           
 
Method Summary
 com.funambol.framework.server.Sync4jUser authenticateUser(com.funambol.framework.core.Cred credential)
          Authenticates a credential.
 com.funambol.framework.security.Officer.AuthStatus authorize(java.security.Principal principal, java.lang.String resource)
          Authorizes a resource.
 java.lang.String getClientAuth()
          Gets the supported authentication type
 java.lang.String getServerAuth()
           
 void setServerAuth(java.lang.String serverAuth)
           
 void unAuthenticate(com.funambol.framework.server.Sync4jUser user)
          Un-authenticates the given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected com.funambol.framework.logging.FunambolLogger log

ps

protected com.funambol.framework.server.store.PersistentStore ps

userManager

protected com.funambol.server.admin.UserManager userManager
Constructor Detail

EmailOfficer

public EmailOfficer()
Method Detail

getClientAuth

public java.lang.String getClientAuth()
Gets the supported authentication type

Specified by:
getClientAuth in interface com.funambol.framework.security.Officer
Returns:
the basic authentication type

getServerAuth

public java.lang.String getServerAuth()
Specified by:
getServerAuth in interface com.funambol.framework.security.Officer
Returns:
String

setServerAuth

public void setServerAuth(java.lang.String serverAuth)
Parameters:
serverAuth - String

authenticateUser

public com.funambol.framework.server.Sync4jUser authenticateUser(com.funambol.framework.core.Cred credential)
Authenticates a credential.

Specified by:
authenticateUser in interface com.funambol.framework.security.Officer
Parameters:
credential - the credential to be authenticated
Returns:
the Sync4jUser if the credential is autenticated, null otherwise

authorize

public com.funambol.framework.security.Officer.AuthStatus authorize(java.security.Principal principal,
                                                                    java.lang.String resource)
Authorizes a resource.

Specified by:
authorize in interface com.funambol.framework.security.Officer
Parameters:
principal - the requesting entity
resource - the name (or the identifier) of the resource to be authorized
Returns:
an AuthStatus

unAuthenticate

public void unAuthenticate(com.funambol.framework.server.Sync4jUser user)
Un-authenticates the given user. Do nothing. In the current implementation, the authentication is discarde as soon as the LoginContext is garbage collected.

Specified by:
unAuthenticate in interface com.funambol.framework.security.Officer
Parameters:
user - the user to be unauthenticated


Copyright © 2005-2006 Funambol.