Skip to content

Commit

Permalink
Initial development sof changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellrgn committed Jan 29, 2024
1 parent 180ac2e commit ac47cae
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ export const API_BASE = import.meta.env.VITE_API_BASE;
export const INTERMEDIATE_FHIR_SERVER_BASE = import.meta.env.VITE_INTERMEDIATE_FHIR_SERVER_BASE;

export const SOF_HOSTS = [
// {
// id: "smit",
// name: "SMART Health IT Demo",
// url: "https://launch.smarthealthit.org/v/r4/sim/WzMsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir",
// clientId: "<no client id>",
// note: "Credentials provided"
// },
{
id: "smit",
name: "SMART Health IT Demo",
url: "https://launch.smarthealthit.org/v/r4/sim/WzMsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir",
clientId: "<no client id>",
id: "keycloak",
name: "Let's Talk Tech Login",
url: "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt",
clientId: "shl_creator",
note: "Credentials provided"
}
];
Expand Down
6 changes: 6 additions & 0 deletions src/lib/sofClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ let client;
function authorize(inputFhirUrl, clientId) {
config.iss = inputFhirUrl;
config.clientId = clientId ?? "no clientId configured";
// TODO: Remove in favor of producing correct token response on server side
let fakeTokenResponse = {
authorizeUri: "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt/protocol/openid-connect/auth",
tokenUri: "https://keycloak.inform.dev.cirg.uw.edu/realms/ltt/protocol/openid-connect/token"
}
config.fakeTokenResponse = fakeTokenResponse;
return FHIR.oauth2.authorize(config);
};

Expand Down

0 comments on commit ac47cae

Please sign in to comment.