Last active
February 9, 2022 13:20
-
-
Save ldclakmal/6d3265b16fd463b473889a20ca23359b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ballerina/grpc; | |
GrpcClient clientEP = check new("https://localhost:9191", | |
auth = { | |
issuer: "order-service", | |
audience: ["payment-service", "delivery-service"], | |
keyId: "5a0b754-895f-4279-8843-b745e11a57e9", | |
jwtId: "JlbmMiOiJBMTI4Q0JDLUhTMjU2In", | |
customClaims: { "scp": "admin" }, | |
expTime: 3600, | |
signatureConfig: { | |
config: { | |
keyFile: "/path/to/order-service-private.key" | |
} | |
} | |
}, | |
secureSocket = { | |
cert: "/path/to/public.crt" | |
} | |
); | |
service /foo on ordersEP { | |
resource function post bar() returns json|error { | |
// business logic | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment