mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add token expiry time to QR payload
This commit is contained in:
parent
09907233fc
commit
0e7c445a56
@ -21,6 +21,7 @@ package org.wso2.carbon.apimgt.application.extension;
|
||||
import org.wso2.carbon.apimgt.application.extension.dto.ApiApplicationKey;
|
||||
import org.wso2.carbon.apimgt.application.extension.exception.APIManagerException;
|
||||
import org.wso2.carbon.apimgt.integration.client.store.StoreClient;
|
||||
import org.wso2.carbon.identity.jwt.client.extension.dto.AccessTokenInfo;
|
||||
|
||||
/**
|
||||
* This comprise on operation that is been done with api manager from CDMF. This service needs to be implemented in APIM.
|
||||
@ -88,7 +89,7 @@ public interface APIManagementProviderService {
|
||||
* @throws APIManagerException if error occurred while getting the access token for given scopes,
|
||||
* validity period etc.
|
||||
*/
|
||||
String getAccessToken(String scopes, String[] tags, String applicationName, String tokenType, String validityPeriod)
|
||||
AccessTokenInfo getAccessToken(String scopes, String[] tags, String applicationName, String tokenType, String validityPeriod)
|
||||
throws APIManagerException;
|
||||
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
|
||||
}
|
||||
|
||||
@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 {
|
||||
try {
|
||||
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
|
||||
@ -262,7 +262,7 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
|
||||
.getAccessToken(clientCredentials.getConsumerKey(), clientCredentials.getConsumerSecret(), user,
|
||||
scopes);
|
||||
|
||||
return accessTokenForAdmin.getAccessToken();
|
||||
return accessTokenForAdmin;
|
||||
} catch (JWTClientException e) {
|
||||
String msg = "JWT Error occurred while registering Application to get access token.";
|
||||
log.error(msg, e);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user