com.openexchange.admin.rmi
Interface OXLoginInterface

All Superinterfaces:
Remote

public interface OXLoginInterface
extends Remote

This interface defines methods for doing a "login" for an user or admin.
Can be usefull in UI`s which provide login masks for checking login informations.

Example:

 final OXLoginInterface iface = (OXLoginInterface)Naming.lookup("rmi:///oxhost/"+OXLoginInterface.RMI_NAME);
 
 final Context ctx = new Context(1);
 
 final Credentials auth = new Credentials();
 auth.setLogin("myuser");
 auth.setPassword("secret");
 
 try{
 User account_data = iface.login2User(ctx,auth);
  // Do something after user logged in successfully.
 }catch(InvalidCredentialsException ice){
  // show error in UI.  
 }
 

Author:
Manuel Kraft, Carsten Hoeger, Dennis Sieben

Field Summary
static String RMI_NAME
          RMI name to be used in the naming lookup.
 
Method Summary
 void login(Context ctx, Credentials auth)
          Login method to check if given credentials are correct.
 void login(Credentials auth)
          Login method for the master admin account.
 User login2User(Context ctx, Credentials auth)
          Login method for a context admin or a normal user.
 

Field Detail

RMI_NAME

static final String RMI_NAME
RMI name to be used in the naming lookup.

See Also:
Constant Field Values
Method Detail

login

void login(Context ctx,
           Credentials auth)
           throws RemoteException,
                  StorageException,
                  InvalidCredentialsException,
                  NoSuchContextException,
                  InvalidDataException,
                  DatabaseUpdateException
Login method to check if given credentials are correct.

Parameters:
ctx -
auth -
Throws:
RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
DatabaseUpdateException

login2User

User login2User(Context ctx,
                Credentials auth)
                throws RemoteException,
                       StorageException,
                       InvalidCredentialsException,
                       NoSuchContextException,
                       InvalidDataException,
                       DatabaseUpdateException
Login method for a context admin or a normal user.

Parameters:
ctx -
auth -
Returns:
An user object with all data of the user who just logged in.
Throws:
RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
DatabaseUpdateException

login

void login(Credentials auth)
           throws RemoteException,
                  StorageException,
                  InvalidCredentialsException,
                  InvalidDataException
Login method for the master admin account.

Parameters:
auth -
Throws:
RemoteException
StorageException
InvalidCredentialsException
InvalidDataException