airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anujb...@apache.org
Subject [22/23] airavata git commit: minor change
Date Tue, 02 May 2017 16:49:37 GMT
minor change


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/96bdea2d
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/96bdea2d
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/96bdea2d

Branch: refs/heads/develop
Commit: 96bdea2d043ab19a9b1d4f3762a4ca3086f9e1c0
Parents: 686d8e3
Author: Anuj Bhandar <bhandar.anuj@gmail.com>
Authored: Mon May 1 20:45:48 2017 -0400
Committer: Anuj Bhandar <bhandar.anuj@gmail.com>
Committed: Mon May 1 20:45:48 2017 -0400

----------------------------------------------------------------------
 .../core/impl/TenantManagementKeycloakImpl.java         | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/96bdea2d/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
b/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
index 5c07980..5f4b417 100644
--- a/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
+++ b/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
@@ -174,6 +174,18 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface
{
             String[] defaultRoles = {"gateway-user"};
             pgaClient.setDefaultRoles(defaultRoles);
             List<String> redirectUris = new ArrayList<>();
+            if(gatewayDetails.getGatewayURL()!=null){
+                if(gatewayDetails.getGatewayURL().endsWith("/")){
+                    redirectUris.add(gatewayDetails.getGatewayURL() + "callback-url");
+                } else {
+                    redirectUris.add(gatewayDetails.getGatewayURL() + "/callback-url");
+                }
+            } else {
+                logger.error("Request for Realm Client Creation failed, callback URL not
present");
+                IamAdminServicesException ex = new IamAdminServicesException();
+                ex.setMessage("Gateway Url field in GatewayProfile cannot be empty, Relam
Client creation failed");
+                throw ex;
+            }
             redirectUris.add("http://accord.scigap.org/callback-url");
             pgaClient.setRedirectUris(redirectUris);
             pgaClient.setPublicClient(false);


Mime
View raw message