* @param myproxyServer
* eg:portal-dev.leadproject.org
* @return proxy credential
*/
public static GSSCredential getGSSCredential(String userName, String password, String myproxyServer) {
MyProxyClient myProxyClient = new MyProxyClient(myproxyServer, XBayaConstants.DEFAULT_MYPROXY_PORT, userName,
password, XBayaConstants.DEFAULT_MYPROXY_LIFTTIME);
try {
myProxyClient.load();
} catch (MyProxyException e) {
throw new WorkflowRuntimeException("Failed loading the myproxy", e);
}
GSSCredential gssCredential = myProxyClient.getProxy();
return gssCredential;
}