|
|
@ -101,6 +101,10 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|
|
|
REQUIRED_SCOPE);
|
|
|
|
REQUIRED_SCOPE);
|
|
|
|
tenantBasedAccessTokenInfo.setExpiresIn(
|
|
|
|
tenantBasedAccessTokenInfo.setExpiresIn(
|
|
|
|
System.currentTimeMillis() + (tenantBasedAccessTokenInfo.getExpiresIn() * 1000));
|
|
|
|
System.currentTimeMillis() + (tenantBasedAccessTokenInfo.getExpiresIn() * 1000));
|
|
|
|
|
|
|
|
if (tenantBasedAccessTokenInfo.getScopes() == null) {
|
|
|
|
|
|
|
|
throw new APIMClientOAuthException("Failed to retrieve scopes from access token");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (tenantBasedAccessTokenInfo.getScopes().contains(APIM_SUBSCRIBE_SCOPE)) {
|
|
|
|
if (tenantBasedAccessTokenInfo.getScopes().contains(APIM_SUBSCRIBE_SCOPE)) {
|
|
|
|
tenantUserTokenMap.put(username, tenantBasedAccessTokenInfo);
|
|
|
|
tenantUserTokenMap.put(username, tenantBasedAccessTokenInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|