public interface OXLoginInterface
extends java.rmi.Remote
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. }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RMI_NAME
RMI name to be used in the naming lookup.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static final java.lang.String RMI_NAME
void login(Context ctx, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException
ctx
- auth
- java.rmi.RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
DatabaseUpdateException
User login2User(Context ctx, Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, NoSuchContextException, InvalidDataException, DatabaseUpdateException
ctx
- auth
- java.rmi.RemoteException
StorageException
InvalidCredentialsException
NoSuchContextException
InvalidDataException
DatabaseUpdateException
void login(Credentials auth) throws java.rmi.RemoteException, StorageException, InvalidCredentialsException, InvalidDataException
auth
- java.rmi.RemoteException
StorageException
InvalidCredentialsException
InvalidDataException