Skip to content

Commit

Permalink
Add support for authz service and prepare release 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ThishaniLucas committed Aug 15, 2023
1 parent 7adc33b commit bf06eed
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 37 deletions.
9 changes: 7 additions & 2 deletions Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
[package]
org = "wso2healthcare"
name = "AUBasePatientAPI"
version = "1.0.1"
distribution = "2201.6.0"
version = "1.0.2"
distribution = "2201.7.0"
authors = ["WSO2 Healthcare"]
keywords = ["Healthcare", "FHIR", "Patient", "r4", "aubase"]

[build-options]
observabilityIncluded = true

[[dependency]]
org="ballerinax"
name="health.fhir.r4"
version="4.1.0"
80 changes: 46 additions & 34 deletions Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.6.0"
distribution-version = "2201.7.0"

[[package]]
org = "ballerina"
name = "auth"
version = "2.8.0"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -22,7 +22,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "cache"
version = "3.5.0"
version = "3.6.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -33,15 +33,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.2.0"
version = "1.3.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.3.1"
version = "2.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -50,7 +50,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "file"
version = "1.7.1"
version = "1.8.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -61,7 +61,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.8.1"
version = "2.9.2"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand All @@ -86,13 +86,14 @@ dependencies = [
{org = "ballerina", name = "url"}
]
modules = [
{org = "ballerina", packageName = "http", moduleName = "http"}
{org = "ballerina", packageName = "http", moduleName = "http"},
{org = "ballerina", packageName = "http", moduleName = "http.httpscerr"}
]

[[package]]
org = "ballerina"
name = "io"
version = "1.4.1"
version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
Expand All @@ -106,7 +107,7 @@ version = "0.0.0"
[[package]]
org = "ballerina"
name = "jwt"
version = "2.8.0"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand Down Expand Up @@ -194,7 +195,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "log"
version = "2.7.1"
version = "2.8.1"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -208,7 +209,7 @@ modules = [
[[package]]
org = "ballerina"
name = "mime"
version = "2.7.1"
version = "2.8.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand All @@ -218,7 +219,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "oauth2"
version = "2.8.0"
version = "2.9.0"
dependencies = [
{org = "ballerina", name = "cache"},
{org = "ballerina", name = "crypto"},
Expand All @@ -231,15 +232,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "observe"
version = "1.0.7"
version = "1.1.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "os"
version = "1.6.1"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
Expand All @@ -260,7 +261,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "task"
version = "2.3.3"
version = "2.4.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand All @@ -269,23 +270,23 @@ dependencies = [
[[package]]
org = "ballerina"
name = "time"
version = "2.2.5"
version = "2.3.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "url"
version = "2.2.4"
version = "2.3.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "uuid"
version = "1.5.1"
version = "1.6.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -322,7 +323,7 @@ dependencies = [
[[package]]
org = "ballerinax"
name = "health.fhir.r4"
version = "3.0.1"
version = "4.1.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "http"},
Expand All @@ -333,20 +334,16 @@ dependencies = [
{org = "ballerina", name = "time"},
{org = "ballerina", name = "url"},
{org = "ballerina", name = "uuid"},
{org = "ballerinax", name = "health.base"},
{org = "ballerinax", name = "health.fhir.r4utils"}
{org = "ballerinax", name = "health.base"}
]
modules = [
{org = "ballerinax", packageName = "health.fhir.r4", moduleName = "health.fhir.r4"},
{org = "ballerinax", packageName = "health.fhir.r4", moduleName = "health.fhir.r4.parser"},
{org = "ballerinax", packageName = "health.fhir.r4", moduleName = "health.fhir.r4.terminology"},
{org = "ballerinax", packageName = "health.fhir.r4", moduleName = "health.fhir.r4.validator"}
{org = "ballerinax", packageName = "health.fhir.r4", moduleName = "health.fhir.r4"}
]

[[package]]
org = "ballerinax"
name = "health.fhir.r4.aubase410"
version = "1.0.5"
version = "1.0.7"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "log"},
Expand All @@ -358,23 +355,38 @@ modules = [

[[package]]
org = "ballerinax"
name = "health.fhir.r4utils"
version = "1.0.2"
name = "health.fhir.r4.international401"
version = "1.0.0"
dependencies = [
{org = "ballerina", name = "lang.int"},
{org = "ballerina", name = "regex"}
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "log"},
{org = "ballerinax", name = "health.fhir.r4"}
]

[[package]]
org = "ballerinax"
name = "health.fhir.r4.parser"
version = "4.0.0"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "log"},
{org = "ballerinax", name = "health.fhir.r4"},
{org = "ballerinax", name = "health.fhir.r4.international401"}
]

[[package]]
org = "ballerinax"
name = "health.fhirr4"
version = "1.0.6"
version = "1.0.8"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "jwt"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "regex"},
{org = "ballerinai", name = "observe"},
{org = "ballerinax", name = "health.fhir.r4"}
{org = "ballerinax", name = "health.fhir.r4"},
{org = "ballerinax", name = "health.fhir.r4.parser"}
]
modules = [
{org = "ballerinax", packageName = "health.fhirr4", moduleName = "health.fhirr4"}
Expand All @@ -383,7 +395,7 @@ modules = [
[[package]]
org = "wso2healthcare"
name = "AUBasePatientAPI"
version = "1.0.1"
version = "1.0.2"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "log"},
Expand Down
10 changes: 9 additions & 1 deletion api_config.bal
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
// Developers are allowed modify this file as per the requirement.

import ballerinax/health.fhir.r4;
import ballerina/os;

configurable string authzServiceUrl = os:getEnv("AUTHZ_SERVICE_URL");
configurable string priviledgedClaimUrl = os:getEnv("PRIVILEDGED_CLAIM_URL");

final r4:ResourceAPIConfig apiConfig = {
resourceType: "Patient",
Expand Down Expand Up @@ -240,5 +244,9 @@ final r4:ResourceAPIConfig apiConfig = {
operations: [

],
serverConfig: ()
serverConfig: (),
authzConfig: authzServiceUrl.length() > 0 ? {
authzServiceUrl: authzServiceUrl,
privilegedClaimUrl: priviledgedClaimUrl.length() > 0 ? priviledgedClaimUrl : ()
} : ()
};

0 comments on commit bf06eed

Please sign in to comment.