com.openexchange.admin.rmi.impl
Class BasicAuthenticator

java.lang.Object
  extended by com.openexchange.admin.rmi.impl.OXCommonImpl
      extended by com.openexchange.admin.rmi.impl.BasicAuthenticator

public class BasicAuthenticator
extends OXCommonImpl

Author:
cutmasta

Constructor Summary
BasicAuthenticator()
           
BasicAuthenticator(BundleContext context)
          Use this constructor when additional bundles should be able to override login
 
Method Summary
 void doAuthentication(Credentials authdata)
          Authenticates the master admin.
 void doAuthentication(Credentials authdata, Context ctx)
          Authenticates ONLY the context admin! This method also validates the Context object data!
 void doUserAuthentication(Credentials authdata, Context ctx)
          Authenticates all users within a context! This method also validates the Context object data!
 void removeFromAuthCache(Context ctx)
          Remove cached admin authdata from auth cache
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAuthenticator

public BasicAuthenticator(BundleContext context)
                   throws StorageException
Use this constructor when additional bundles should be able to override login

Throws:
StorageException

BasicAuthenticator

public BasicAuthenticator()
                   throws StorageException
Throws:
StorageException
Method Detail

doAuthentication

public void doAuthentication(Credentials authdata)
                      throws InvalidCredentialsException
Authenticates the master admin. Other bundles can register an OSGi service here and take care about authentication themself

Parameters:
authdata -
Throws:
InvalidCredentialsException

removeFromAuthCache

public void removeFromAuthCache(Context ctx)
Remove cached admin authdata from auth cache

Parameters:
ctx -

doAuthentication

public void doAuthentication(Credentials authdata,
                             Context ctx)
                      throws InvalidCredentialsException,
                             StorageException,
                             InvalidDataException
Authenticates ONLY the context admin! This method also validates the Context object data!

Parameters:
authdata -
ctx -
Throws:
InvalidCredentialsException
StorageException
InvalidDataException

doUserAuthentication

public void doUserAuthentication(Credentials authdata,
                                 Context ctx)
                          throws InvalidCredentialsException,
                                 StorageException,
                                 InvalidDataException
Authenticates all users within a context! This method also validates the Context object data!

Parameters:
authdata -
ctx -
Throws:
InvalidCredentialsException
StorageException
InvalidDataException