mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #497 from rasika/release-3.0.x
Fixing https://wso2.org/jira/browse/IOTS-362
This commit is contained in:
commit
9a0bbfcdce
@ -121,9 +121,9 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) {
|
||||
} else {
|
||||
userRoles = String(addUserFormData.userRoles).split(",");
|
||||
}
|
||||
if (username.length < devicemgtProps.usernameLength) {
|
||||
log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long");
|
||||
result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long";
|
||||
if (username.length < devicemgtProps.userValidationConfig.usernameLength) {
|
||||
log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long");
|
||||
result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long";
|
||||
} else {
|
||||
try {
|
||||
result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
{
|
||||
"appContext" : "/android-web-agent/",
|
||||
"apiContext" : "api",
|
||||
"httpsURL" : "%https.ip%",
|
||||
"httpURL" : "%http.ip%",
|
||||
"enrollmentDir": "/android-web-agent/enrollment",
|
||||
@ -24,7 +23,9 @@
|
||||
"tokenServiceURL": "%https.ip%/oauth2/token"
|
||||
},
|
||||
"adminUser":"admin",
|
||||
"usernameLength":30,
|
||||
"userValidationConfig" : {
|
||||
"usernameLength":30
|
||||
},
|
||||
"device" : {
|
||||
"ios" : {
|
||||
"location" : "%http.ip%/android-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa",
|
||||
@ -35,16 +36,6 @@
|
||||
},
|
||||
"androidAgentApp" : "android-agent.apk",
|
||||
"windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/services/federated/bst/authentication",
|
||||
"ssoConfiguration" : {
|
||||
"enabled" : false,
|
||||
"issuer" : "mdm",
|
||||
"appName" : "admin_android-web-agent",
|
||||
"identityProviderURL" : "%https.ip%/sso/samlsso.jag",
|
||||
"responseSigningEnabled" : "true",
|
||||
"keyStorePassword" : "wso2carbon",
|
||||
"identityAlias" : "wso2carbon",
|
||||
"keyStoreName" : "/repository/resources/security/wso2carbon.jks"
|
||||
},
|
||||
"generalConfig" : {
|
||||
"host" : "%http.ip%",
|
||||
"companyName" : "WSO2 Enterprise Mobility Manager",
|
||||
|
||||
@ -121,9 +121,9 @@ if (uriMatcher.match("/{context}/api/user/authenticate")) {
|
||||
} else {
|
||||
userRoles = String(addUserFormData.userRoles).split(",");
|
||||
}
|
||||
if (username.length < devicemgtProps.usernameLength) {
|
||||
log.error("Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long");
|
||||
result = "Username Must be between 1 and " + devicemgtProps.usernameLength + " characters long";
|
||||
if (username.length < devicemgtProps.userValidationConfig.usernameLength) {
|
||||
log.error("Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long");
|
||||
result = "Username Must be between 1 and " + devicemgtProps.userValidationConfig.usernameLength + " characters long";
|
||||
} else {
|
||||
try {
|
||||
result = userModule.addUser(username, firstname, lastname, emailAddress, userRoles);
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
{
|
||||
"appContext" : "/windows-web-agent/",
|
||||
"apiContext" : "api",
|
||||
"httpsURL" : "%https.ip%",
|
||||
"httpURL" : "%http.ip%",
|
||||
"enrollmentDir": "/windows-web-agent/enrollment",
|
||||
@ -24,7 +23,9 @@
|
||||
"tokenServiceURL": "%https.ip%/oauth2/token"
|
||||
},
|
||||
"adminUser":"admin",
|
||||
"usernameLength":30,
|
||||
"userValidationConfig": {
|
||||
"usernameLength":30
|
||||
},
|
||||
"device" : {
|
||||
"ios" : {
|
||||
"location" : "%http.ip%/windows-web-agent/public/mdm.page.enrollments.ios.download-agent/asset/ios-agent.ipa",
|
||||
@ -35,16 +36,6 @@
|
||||
},
|
||||
"androidAgentApp" : "android-agent.apk",
|
||||
"windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/federated/bst/authentication",
|
||||
"ssoConfiguration" : {
|
||||
"enabled" : false,
|
||||
"issuer" : "mdm",
|
||||
"appName" : "admin_windows-web-agent",
|
||||
"identityProviderURL" : "%https.ip%/sso/samlsso.jag",
|
||||
"responseSigningEnabled" : "true",
|
||||
"keyStorePassword" : "wso2carbon",
|
||||
"identityAlias" : "wso2carbon",
|
||||
"keyStoreName" : "/repository/resources/security/wso2carbon.jks"
|
||||
},
|
||||
"generalConfig" : {
|
||||
"host" : "%http.ip%",
|
||||
"companyName" : "WSO2 Enterprise Mobility Manager",
|
||||
|
||||
@ -142,7 +142,7 @@ var handlers = function () {
|
||||
"client credentials to session context as the server is unable to obtain " +
|
||||
"dynamic client credentials - setUpEncodedTenantBasedClientAppCredentials(x)");
|
||||
} else {
|
||||
if (devicemgtProps["apimgt-gateway"]) {
|
||||
if (devicemgtProps["gatewayEnabled"]) {
|
||||
var jwtToken = tokenUtil.getAccessTokenByJWTGrantType(dynamicClientAppCredentials);
|
||||
if (!jwtToken) {
|
||||
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user