Rena Tsantouli 2009-05-07 11:30:19 +00:00
parent 9c8ec976c3
commit 339668520d
3 changed files with 15 additions and 10 deletions

View File

@ -3,8 +3,8 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="C:/Documents and Settings/rena/Desktop/ISCache.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/dependenciesD4S"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/ehcache"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/gCore"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/gCore-0-5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/dependenciesNewVoms"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -61,11 +61,16 @@ public class ApplicationCredentials {
//user "application" does not exist on this VRE, so we add him and try to get credential again
VOMSAdminImpl vomsA;
try {
vomsA = VOMSAdminManager.getVOMSAdmin();
String[] roles = vomsA.listRoles();
vomsA.createUser("application", userDN+"application", userCA, "application@gcube.org");
vomsA.addMember(VREname, userDN+"application", userCA);
vomsA.assignRole(VREname, roles[0], userDN+"application", userCA);
// vomsA = VOMSAdminManager.getVOMSAdmin();
// String[] roles = vomsA.listRoles();
// vomsA.createUser("application", userDN+"application", userCA, "application@gcube.org");
// vomsA.addMember(VREname, userDN+"application", userCA);
// vomsA.assignRole(VREname, roles[0], userDN+"application", userCA);
vomsA = new VOMSAdminImpl();
String[] roles = vomsA.getPortType().listRoles();
vomsA.getExtendedPortType().createUser("application", userDN+"application", userCA, "application@gcube.org");
vomsA.getExtendedPortType().addOnlineCAMember(VREname, userDN+"application");
vomsA.getExtendedPortType().assignOnlineCARole(VREname, roles[0], userDN+"application");
}
catch (Exception e) {
vomsA = null;

View File

@ -23,9 +23,9 @@ public class UserCredential {
try {
String sharedDir = Settings.getInstance().getProperty("sharedDir");
System.out.println("file " + sharedDir + "/vomsAPI.properties exists: "+ new File(sharedDir + "/vomsAPI.properties").exists());
man = new CredentialsManagerImpl(sharedDir + "/vomsAPI.properties");
// VOMSAdminImpl vomsAdm = new VOMSAdminImpl(sharedDir + "/vomsAPI.properties");
// man = new CredentialsManagerImpl(vomsAdm);
// man = new CredentialsManagerImpl(sharedDir + "/vomsAPI.properties");
VOMSAdminImpl vomsAdm = new VOMSAdminImpl(sharedDir + "/vomsAPI.properties");
man = new CredentialsManagerImpl(vomsAdm);
} catch (Exception e1) {
e1.printStackTrace();
}