sync4j.exchange.security
Class ExchangeOfficer

java.lang.Object
  extended bysync4j.exchange.security.ExchangeOfficer
All Implemented Interfaces:
sync4j.framework.security.Officer, java.io.Serializable

public class ExchangeOfficer
extends java.lang.Object
implements sync4j.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

Field Summary
protected  java.util.logging.Logger log
           
protected  sync4j.framework.server.store.PersistentStore ps
           
 
Constructor Summary
ExchangeOfficer()
           
 
Method Summary
 boolean authenticate(sync4j.framework.core.Cred credential)
          Authenticates a credential.
 boolean authorize(java.security.Principal principal, java.lang.String resource)
          Authorizes a resource.
 java.lang.String getClientAuth()
           
 java.lang.String getExchangeFolder()
           
 java.lang.String getExchangeHost()
           
 int getExchangePort()
           
 java.lang.String getServerAuth()
           
 boolean isAccountExpired()
           
 boolean isLoginFailed()
           
 void setClientAuth(java.lang.String clientAuth)
           
 void setExchangeFolder(java.lang.String exchangeFolder)
           
 void setExchangeHost(java.lang.String exchangeHost)
           
 void setExchangePort(int exchangePort)
           
 void setServerAuth(java.lang.String serverAuth)
           
 void unAuthenticate(sync4j.framework.core.Cred credential)
          Un-authenticates a credential.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected java.util.logging.Logger log

ps

protected sync4j.framework.server.store.PersistentStore ps
Constructor Detail

ExchangeOfficer

public ExchangeOfficer()
Method Detail

isLoginFailed

public boolean isLoginFailed()

getClientAuth

public java.lang.String getClientAuth()
Specified by:
getClientAuth in interface sync4j.framework.security.Officer

setClientAuth

public void setClientAuth(java.lang.String clientAuth)

getServerAuth

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

setServerAuth

public void setServerAuth(java.lang.String serverAuth)

getExchangeHost

public java.lang.String getExchangeHost()

setExchangeHost

public void setExchangeHost(java.lang.String exchangeHost)

getExchangePort

public int getExchangePort()

setExchangePort

public void setExchangePort(int exchangePort)

getExchangeFolder

public java.lang.String getExchangeFolder()

setExchangeFolder

public void setExchangeFolder(java.lang.String exchangeFolder)

authenticate

public boolean authenticate(sync4j.framework.core.Cred credential)
Authenticates a credential.

Specified by:
authenticate in interface sync4j.framework.security.Officer
Parameters:
credential - the credential to be authenticated
Returns:
true if the credential is autenticated, false otherwise

authorize

public boolean authorize(java.security.Principal principal,
                         java.lang.String resource)
Authorizes a resource.

Specified by:
authorize in interface sync4j.framework.security.Officer
Parameters:
principal - the requesting entity
resource - the name (or the identifier) of the resource to be authorized
Returns:
true if the credential is authorized to access the resource, false otherwise

unAuthenticate

public void unAuthenticate(sync4j.framework.core.Cred credential)
Un-authenticates a credential. Do nothing. In the current implementation, the authentication is discarde as soon as the LoginContext is garbage collected.

Specified by:
unAuthenticate in interface sync4j.framework.security.Officer
Parameters:
credential - the credential to be unauthenticated

isAccountExpired

public boolean isAccountExpired()
Specified by:
isAccountExpired in interface sync4j.framework.security.Officer
Returns:
boolean
See Also:
Officer


Copyright © 2003-2005 Sync4j.