protected List<CallDescriptor> checkSubscriberIdAuth(String subscriberId, AuthIdentity authIdentity) throws GatewayException {
// Get subscriber matching CallDescriptors
Auth auth;
try {
auth = dataManager.getAuthById(subscriberId);
} catch (InvalidIDException e) {
throw new GatewayException(GatewayExceptionCode.AUTHORIZATION, e.getMessage() );
}
if (auth == null || !auth.getStatus().isActive()) {
throw new GatewayException(GatewayExceptionCode.AUTHORIZATION, "Authorization status is invalid");
}
return dataManager.getMatchingPolicies(authIdentity.getApi(), auth);