Skip to content

Commit

Permalink
Enables the well-known smart-configuration even if OAuth is not enabed
Browse files Browse the repository at this point in the history
  • Loading branch information
hankwallace committed May 7, 2024
1 parent b9fad53 commit 9bc3af6
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -453,19 +453,21 @@ 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
fhirServer.registerInterceptor(new ConsentInterceptor(new CustomConsentService(daoRegistry, appProperties)));
}
}

// Support for SMART on FHIR launchers
fhirServer.registerInterceptor(new SmartWellKnownInterceptor(appProperties));

repositoryValidatingInterceptor.ifPresent(fhirServer::registerInterceptor);

// register custom interceptors
Expand Down

0 comments on commit 9bc3af6

Please sign in to comment.