Skip to content

Commit

Permalink
Auth redirect fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bstewartlg committed Mar 19, 2024
1 parent 925448f commit ca79ac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void authSync(@PathVariable String launch, @RequestParam Map<String, Stri
private String _parseRedirect(Map<String, String> reqParamValue, HttpServletRequest request) {
String currentRedirectURI = reqParamValue.get("redirect_uri");
//String finalRedirectURI = "http://" + ((System.getenv("DOCKER_PROFILE") != null && System.getenv("DOCKER_PROFILE").equals("true")) && Config.get("auth_redirect_host") != null ? Config.get("auth_redirect_host") : request.getLocalName()) + ":" + request.getLocalPort() + "/test-ehr/_auth/" + reqParamValue.get("launch") + "?redirect_uri=" + currentRedirectURI;
String finalRedirectURI = (Config.get("auth_redirect_host") != null ? Config.get("auth_redirect_host") : request.getLocalName() + ":" + request.getLocalPort()) + "/test-ehr/_auth/" + reqParamValue.get("launch") + "?redirect_uri=" + currentRedirectURI;
String finalRedirectURI = (Config.get("auth_redirect_host") != null ? Config.get("auth_redirect_host") : request.getScheme() + "://" + request.getLocalName() + ":" + request.getLocalPort()) + "/test-ehr/_auth/" + reqParamValue.get("launch") + "?redirect_uri=" + currentRedirectURI;
reqParamValue.put("redirect_uri", finalRedirectURI);
payloadDAO.updateRedirect(reqParamValue.get("launch"), finalRedirectURI);
return paramFormatter(reqParamValue);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ spring:
job:
enabled: false

oauth_token: "http://localhost:8180/realms/ClientFhirServer/protocol/openid-connect/token"
oauth_authorize: "http://localhost:8180/realms/ClientFhirServer/protocol/openid-connect/auth"
# oauth_token: "http://localhost:8180/realms/ClientFhirServer/protocol/openid-connect/token"
# oauth_authorize: "http://localhost:8180/realms/ClientFhirServer/protocol/openid-connect/auth"

hapi:
fhir:
Expand Down

0 comments on commit ca79ac0

Please sign in to comment.