Skip to content
Snippets Groups Projects
Commit 5e439ef7 authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story 1849. Fixed merge conflict.

parents 839bc5a6 43d4235c
No related branches found
No related tags found
No related merge requests found
...@@ -169,10 +169,9 @@ public class WhoAmIServlet extends HttpServlet ...@@ -169,10 +169,9 @@ public class WhoAmIServlet extends HttpServlet
LocalAuthority localAuthority = new LocalAuthority(); LocalAuthority localAuthority = new LocalAuthority();
URI umsServiceURI = localAuthority.getServiceURI("ac"); URI umsServiceURI = localAuthority.getServiceURI("ac");
log.debug("ums service uri: " + umsServiceURI); log.debug("ums service uri: " + umsServiceURI);
final URL serviceURL = registryClient.getServiceURL(umsServiceURI, Standards.UMS_USERS_01, AuthMethod.PASSWORD); final URL serviceURL = registryClient.getServiceURL(umsServiceURI, Standards.UMS_USERS_01, AuthMethod.CERT);
final URL redirectURL = new URL(serviceURL.toExternalForm() + USER_GET_PATH); final URL redirectURL = new URL(serviceURL.toExternalForm() + USER_GET_PATH);
// Take the first one. // Take the first one.
......
...@@ -525,10 +525,10 @@ public class GMSClient implements TransferListener ...@@ -525,10 +525,10 @@ public class GMSClient implements TransferListener
AccessControlException, IOException AccessControlException, IOException
{ {
String path = targetGroupName + "/groupMembers/" + groupMemberName; String path = "/" + targetGroupName + "/groupMembers/" + groupMemberName;
URL groupsURL = getRegistryClient() URL groupsURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT);
URL addGroupMemberURL = new URL(groupsURL.toExternalForm() + "/" + path); URL addGroupMemberURL = new URL(groupsURL.toExternalForm() + path);
log.debug("addGroupMember request to " + addGroupMemberURL.toString()); log.debug("addGroupMember request to " + addGroupMemberURL.toString());
// reset the state of the cache // reset the state of the cache
...@@ -586,10 +586,10 @@ public class GMSClient implements TransferListener ...@@ -586,10 +586,10 @@ public class GMSClient implements TransferListener
log.debug("addUserMember: " + targetGroupName + " + " + userID.getName()); log.debug("addUserMember: " + targetGroupName + " + " + userID.getName());
String userIDType = AuthenticationUtil.getPrincipalType(userID); String userIDType = AuthenticationUtil.getPrincipalType(userID);
String path = targetGroupName + "/userMembers/" + NetUtil.encode(userID.getName()) + "?idType=" + userIDType; String path = "/" + targetGroupName + "/userMembers/" + NetUtil.encode(userID.getName()) + "?idType=" + userIDType;
URL groupsURL = getRegistryClient() URL groupsURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT);
URL addUserMemberURL = new URL(groupsURL.toExternalForm() + "/" + path); URL addUserMemberURL = new URL(groupsURL.toExternalForm() + path);
log.debug("addUserMember request to " + addUserMemberURL.toString()); log.debug("addUserMember request to " + addUserMemberURL.toString());
...@@ -643,10 +643,10 @@ public class GMSClient implements TransferListener ...@@ -643,10 +643,10 @@ public class GMSClient implements TransferListener
throws GroupNotFoundException, AccessControlException, IOException throws GroupNotFoundException, AccessControlException, IOException
{ {
String path = targetGroupName + "/groupMembers/" + groupMemberName; String path = "/" + targetGroupName + "/groupMembers/" + groupMemberName;
URL groupsURL = getRegistryClient() URL groupsURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT);
URL removeGroupMemberURL = new URL(groupsURL.toExternalForm() + "/" + path); URL removeGroupMemberURL = new URL(groupsURL.toExternalForm() + path);
log.debug("removeGroupMember request to " + log.debug("removeGroupMember request to " +
removeGroupMemberURL.toString()); removeGroupMemberURL.toString());
...@@ -712,10 +712,10 @@ public class GMSClient implements TransferListener ...@@ -712,10 +712,10 @@ public class GMSClient implements TransferListener
String userIDType = AuthenticationUtil.getPrincipalType(userID); String userIDType = AuthenticationUtil.getPrincipalType(userID);
log.debug("removeUserMember: " + targetGroupName + " - " + userID.getName() + " type: " + userIDType); log.debug("removeUserMember: " + targetGroupName + " - " + userID.getName() + " type: " + userIDType);
String path = targetGroupName + "/userMembers/" + NetUtil.encode(userID.getName()) + "?idType=" + userIDType; String path = "/" + targetGroupName + "/userMembers/" + NetUtil.encode(userID.getName()) + "?idType=" + userIDType;
URL groupsURL = getRegistryClient() URL groupsURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.GMS_GROUPS_01, AuthMethod.CERT);
URL removeUserMemberURL = new URL(groupsURL.toExternalForm() + "/" + path); URL removeUserMemberURL = new URL(groupsURL.toExternalForm() + path);
log.debug("removeUserMember: " + removeUserMemberURL.toString()); log.debug("removeUserMember: " + removeUserMemberURL.toString());
...@@ -827,7 +827,7 @@ public class GMSClient implements TransferListener ...@@ -827,7 +827,7 @@ public class GMSClient implements TransferListener
URL searchURL = getRegistryClient() URL searchURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.GMS_SEARCH_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.GMS_SEARCH_01, AuthMethod.CERT);
URL getMembershipsURL = new URL(searchURL.toExternalForm() + "/" + searchGroupPath.toString()); URL getMembershipsURL = new URL(searchURL.toExternalForm() + searchGroupPath.toString());
log.debug("getMemberships request to " + getMembershipsURL.toString()); log.debug("getMemberships request to " + getMembershipsURL.toString());
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
...@@ -938,7 +938,7 @@ public class GMSClient implements TransferListener ...@@ -938,7 +938,7 @@ public class GMSClient implements TransferListener
URL searchURL = getRegistryClient() URL searchURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.GMS_SEARCH_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.GMS_SEARCH_01, AuthMethod.CERT);
URL getMembershipURL = new URL(searchURL.toExternalForm() + "/" + searchGroupPath.toString()); URL getMembershipURL = new URL(searchURL.toExternalForm() + searchGroupPath.toString());
log.debug("getMembership request to " + getMembershipURL.toString()); log.debug("getMembership request to " + getMembershipURL.toString());
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
......
...@@ -145,7 +145,7 @@ public class UserClient ...@@ -145,7 +145,7 @@ public class UserClient
{ {
String userID = principal.getName(); String userID = principal.getName();
String path = NetUtil.encode(userID) + "?idType=" + this.getIdType(principal) + "&detail=identity"; String path = "/" + NetUtil.encode(userID) + "?idType=" + this.getIdType(principal) + "&detail=identity";
// augment subject calls are always https with client certs // augment subject calls are always https with client certs
URL usersURL = getRegistryClient() URL usersURL = getRegistryClient()
...@@ -254,7 +254,7 @@ public class UserClient ...@@ -254,7 +254,7 @@ public class UserClient
userWriter.write(user, userXML); userWriter.write(user, userXML);
URL createUserURL = getRegistryClient() URL createUserURL = getRegistryClient()
.getServiceURL(this.serviceID, Standards.UMS_REQS_01, AuthMethod.CERT); .getServiceURL(this.serviceID, Standards.UMS_USERS_01, AuthMethod.CERT);
if (createUserURL == null) if (createUserURL == null)
throw new IllegalArgumentException("No service endpoint for uri " + Standards.UMS_REQS_01); throw new IllegalArgumentException("No service endpoint for uri " + Standards.UMS_REQS_01);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment