diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.java index dd50aa10e83..3002ecb320e 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/StarterJpaConfig.java @@ -453,12 +453,11 @@ public RestfulServer restfulServer( fhirServer.registerProviders(partitionManagementProvider); } - // Support for OAuth2 and API_KEY authentication + // Support for OAuth 2.0 authentication if (appProperties.getOauth().getEnabled()) { fhirServer.registerInterceptor(new CapabilityStatementCustomizer(appProperties)); fhirServer.registerInterceptor(new CustomAuthorizationInterceptor(appProperties)); fhirServer.registerInterceptor(new CustomSearchNarrowingInterceptor(appProperties)); - fhirServer.registerInterceptor(new SmartWellKnownInterceptor(appProperties)); FhirVersionEnum fhirVersion = fhirServer.getFhirContext().getVersion().getVersion(); if (fhirVersion != FhirVersionEnum.R5) { // Utilize the consent interceptor to simulate a patient compartment for the Task resource @@ -466,6 +465,9 @@ public RestfulServer restfulServer( } } + // Support for SMART on FHIR launchers + fhirServer.registerInterceptor(new SmartWellKnownInterceptor(appProperties)); + repositoryValidatingInterceptor.ifPresent(fhirServer::registerInterceptor); // register custom interceptors