mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixed NPE in API publisher client (#882)
This commit is contained in:
parent
7abc9e5844
commit
25840a1279
@ -101,6 +101,10 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
||||
REQUIRED_SCOPE);
|
||||
tenantBasedAccessTokenInfo.setExpiresIn(
|
||||
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)) {
|
||||
tenantUserTokenMap.put(username, tenantBasedAccessTokenInfo);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public class APIMClientOAuthException extends RuntimeException {
|
||||
this.responseStatus = status;
|
||||
}
|
||||
|
||||
APIMClientOAuthException(String message) {
|
||||
public APIMClientOAuthException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user