mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
EMM-1678:Updated the oauth component versions
This commit is contained in:
parent
fc902ba602
commit
4bcf350236
@ -19,7 +19,7 @@
|
|||||||
"owner": "admin@carbon.super",
|
"owner": "admin@carbon.super",
|
||||||
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
"dynamicClientAppRegistrationServiceURL": "%https.ip%/dynamic-client-web/register",
|
||||||
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
"apiManagerClientAppRegistrationServiceURL": "%https.ip%/api-application-registration/register/tenants",
|
||||||
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer",
|
"grantType": "password refresh_token urn:ietf:params:oauth:grant-type:saml2-bearer urn:ietf:params:oauth:grant-type:jwt-bearer",
|
||||||
"tokenScope": "admin",
|
"tokenScope": "admin",
|
||||||
"callbackUrl": "%https.ip%/api/device-mgt/v1.0"
|
"callbackUrl": "%https.ip%/api/device-mgt/v1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -129,10 +129,13 @@ public class JWTClient {
|
|||||||
JSONParser jsonParser = new JSONParser();
|
JSONParser jsonParser = new JSONParser();
|
||||||
JSONObject jsonObject = (JSONObject) jsonParser.parse(response);
|
JSONObject jsonObject = (JSONObject) jsonParser.parse(response);
|
||||||
AccessTokenInfo accessTokenInfo = new AccessTokenInfo();
|
AccessTokenInfo accessTokenInfo = new AccessTokenInfo();
|
||||||
accessTokenInfo.setAccessToken((String) jsonObject.get(JWTConstants.ACCESS_TOKEN_GRANT_TYPE_PARAM_NAME));
|
String accessToken = (String) jsonObject.get(JWTConstants.ACCESS_TOKEN_GRANT_TYPE_PARAM_NAME);
|
||||||
accessTokenInfo.setRefreshToken((String) jsonObject.get(JWTConstants.REFRESH_TOKEN_GRANT_TYPE_PARAM_NAME));
|
if (accessToken != null && !accessToken.isEmpty()) {
|
||||||
accessTokenInfo.setExpiresIn((Long) jsonObject.get(JWTConstants.OAUTH_EXPIRES_IN));
|
accessTokenInfo.setAccessToken(accessToken);
|
||||||
accessTokenInfo.setTokenType((String) jsonObject.get(JWTConstants.OAUTH_TOKEN_TYPE));
|
accessTokenInfo.setRefreshToken((String) jsonObject.get(JWTConstants.REFRESH_TOKEN_GRANT_TYPE_PARAM_NAME));
|
||||||
|
accessTokenInfo.setExpiresIn((Long) jsonObject.get(JWTConstants.OAUTH_EXPIRES_IN));
|
||||||
|
accessTokenInfo.setTokenType((String) jsonObject.get(JWTConstants.OAUTH_TOKEN_TYPE));
|
||||||
|
}
|
||||||
return accessTokenInfo;
|
return accessTokenInfo;
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
throw new JWTClientException("Invalid URL for token endpoint " + jwtConfig.getTokenEndpoint(), e);
|
throw new JWTClientException("Invalid URL for token endpoint " + jwtConfig.getTokenEndpoint(), e);
|
||||||
|
|||||||
@ -147,7 +147,7 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
|
|
||||||
List<ProfileFeature> existingFeaturesList = new ArrayList<>();
|
List<ProfileFeature> existingFeaturesList = new ArrayList<>();
|
||||||
List<ProfileFeature> newFeaturesList = new ArrayList<>();
|
List<ProfileFeature> newFeaturesList = new ArrayList<>();
|
||||||
List<ProfileFeature> feturesToDelete = new ArrayList<>();
|
List<ProfileFeature> featuresToDelete = new ArrayList<>();
|
||||||
List<String> temp = new ArrayList<>();
|
List<String> temp = new ArrayList<>();
|
||||||
List<String> updateDFes = new ArrayList<>();
|
List<String> updateDFes = new ArrayList<>();
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
// Check for the features to delete
|
// Check for the features to delete
|
||||||
for (ProfileFeature feature : existingProfileFeaturesList) {
|
for (ProfileFeature feature : existingProfileFeaturesList) {
|
||||||
if (!updateDFes.contains(feature.getFeatureCode())) {
|
if (!updateDFes.contains(feature.getFeatureCode())) {
|
||||||
feturesToDelete.add(feature);
|
featuresToDelete.add(feature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,8 +194,8 @@ public class PolicyManagerImpl implements PolicyManager {
|
|||||||
featureDAO.addProfileFeatures(newFeaturesList, profileId);
|
featureDAO.addProfileFeatures(newFeaturesList, profileId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!feturesToDelete.isEmpty()) {
|
if (!featuresToDelete.isEmpty()) {
|
||||||
for (ProfileFeature pf : feturesToDelete)
|
for (ProfileFeature pf : featuresToDelete)
|
||||||
featureDAO.deleteProfileFeatures(pf.getId());
|
featureDAO.deleteProfileFeatures(pf.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@ -1791,8 +1791,8 @@
|
|||||||
<carbon.deployment.version>4.7.0</carbon.deployment.version>
|
<carbon.deployment.version>4.7.0</carbon.deployment.version>
|
||||||
|
|
||||||
<!-- Carbon Identity -->
|
<!-- Carbon Identity -->
|
||||||
<carbon.identity.framework.version>5.2.0</carbon.identity.framework.version>
|
<carbon.identity.framework.version>5.2.1</carbon.identity.framework.version>
|
||||||
<identity.inbound.auth.oauth.version>5.1.2</identity.inbound.auth.oauth.version>
|
<identity.inbound.auth.oauth.version>5.1.3</identity.inbound.auth.oauth.version>
|
||||||
<identity.inbound.auth.saml.version>5.1.1</identity.inbound.auth.saml.version>
|
<identity.inbound.auth.saml.version>5.1.1</identity.inbound.auth.saml.version>
|
||||||
|
|
||||||
<!-- Carbon Multi-tenancy -->
|
<!-- Carbon Multi-tenancy -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user