From ec3dbd37ddc3c4695b6bb19b8e3eb3323b2aa1a8 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Tue, 22 Nov 2016 15:03:23 +0530 Subject: [PATCH] fixed commit comments --- .../mgt/jaxrs/beans/AuthorizationRequest.java | 13 +++++++++++++ .../jaggeryapps/devicemgt/app/conf/config.json | 1 + .../app/modules/oauth/token-handler-utils.js | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/AuthorizationRequest.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/AuthorizationRequest.java index 7b45802a2b..d37183abc7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/AuthorizationRequest.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/beans/AuthorizationRequest.java @@ -1,3 +1,16 @@ +/* + * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and limitations under the License. + * + */ package org.wso2.carbon.device.mgt.jaxrs.beans; import io.swagger.annotations.ApiModel; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json index 6eaf99a8ef..4cdc2b4b6c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/conf/config.json @@ -28,6 +28,7 @@ "tokenServiceURL": "%https.ip%/oauth2/token" }, "adminUser":"admin@carbon.super", + "adminUserTenantId":"-1234", "adminRole":"admin", "usernameLength":30, "pageSize":10, diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handler-utils.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handler-utils.js index 48bde5a373..e6cecaeba6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handler-utils.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/modules/oauth/token-handler-utils.js @@ -101,8 +101,9 @@ var utils = function () { return cachedTenantBasedClientAppCredentials; } else { var adminUsername = deviceMgtProps["adminUser"]; + var adminUserTenantId = deviceMgtProps["adminUserTenantId"]; //claims required for jwtAuthenticator. - var claims = {"http://wso2.org/claims/enduserTenantId": "-1234", + var claims = {"http://wso2.org/claims/enduserTenantId": adminUserTenantId, "http://wso2.org/claims/enduser": adminUsername}; var jwtToken = publicMethods.getJwtToken(adminUsername, claims);