Expose ConsentInterceptor#getConsentService for integration test purposes (#6527)

* Expose ConsentInterceptor#getConsentService for integration test purpose.

* Address code review comment.
This commit is contained in:
Martha Mitran 2024-12-19 10:24:26 -08:00 committed by GitHub
parent ac1d5f7840
commit 6cbe11402f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,6 +40,7 @@ import ca.uhn.fhir.rest.server.interceptor.auth.AuthorizationConstants;
import ca.uhn.fhir.rest.server.util.ICachedSearchDetails;
import ca.uhn.fhir.util.BundleUtil;
import ca.uhn.fhir.util.IModelVisitor2;
import com.google.common.annotations.VisibleForTesting;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.apache.commons.lang3.Validate;
@ -157,6 +158,11 @@ public class ConsentInterceptor {
return this;
}
@VisibleForTesting
public List<IConsentService> getConsentServices() {
return Collections.unmodifiableList(myConsentService);
}
@Hook(value = Pointcut.SERVER_INCOMING_REQUEST_PRE_HANDLED)
public void interceptPreHandled(RequestDetails theRequestDetails) {
if (isSkipServiceForRequest(theRequestDetails)) {