|
|
@ -238,7 +238,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public String getAccessToken(String scopes, String[] tags, String applicationName, String tokenType,
|
|
|
|
public AccessTokenInfo getAccessToken(String scopes, String[] tags, String applicationName, String tokenType,
|
|
|
|
String validityPeriod) throws APIManagerException {
|
|
|
|
String validityPeriod) throws APIManagerException {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
|
|
|
|
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
|
|
|
@ -262,7 +262,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
|
|
|
|
.getAccessToken(clientCredentials.getConsumerKey(), clientCredentials.getConsumerSecret(), user,
|
|
|
|
.getAccessToken(clientCredentials.getConsumerKey(), clientCredentials.getConsumerSecret(), user,
|
|
|
|
scopes);
|
|
|
|
scopes);
|
|
|
|
|
|
|
|
|
|
|
|
return accessTokenForAdmin.getAccessToken();
|
|
|
|
return accessTokenForAdmin;
|
|
|
|
} catch (JWTClientException e) {
|
|
|
|
} catch (JWTClientException e) {
|
|
|
|
String msg = "JWT Error occurred while registering Application to get access token.";
|
|
|
|
String msg = "JWT Error occurred while registering Application to get access token.";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|