Remove TODO file
[remote/remote-gui.git] / src / authentication / ClientAuthenticator.java
blobee13071c2d162f7b3f4a458eae2224723304510c
1 package diku.distlab.remote.client.authentication;
3 import java.rmi.RemoteException;
5 import diku.distlab.remote.authentication.*;
7 public class ClientAuthenticator implements Authenticator {
9 AuthenticatorServiceLocator authLocator;
11 public ClientAuthenticator(String server)
13 authLocator = new AuthenticatorServiceLocator();
14 String url ="http://"+server+":8080/axis/services/authentication";
15 authLocator.setauthenticationEndpointAddress(url);
19 public Credential[] getEmptyCredentials() throws RemoteException {
20 Credential[] creds = null;
21 try
23 creds = authLocator.getauthentication().getEmptyCredentials();
24 } catch (javax.xml.rpc.ServiceException e)
26 e.printStackTrace();
28 return creds;
31 public boolean authenticate(String session_id, Credential[] credentials) throws RemoteException {
32 boolean result = false;
33 try
35 result = authLocator.getauthentication().authenticate(session_id,credentials);
36 } catch (javax.xml.rpc.ServiceException e)
38 e.printStackTrace();
40 return result;