Reputation: 151
I am working with Ballerina Swan Lake and have a requirement to access the invocation context from another package.
In earlier versions of Ballerina (1.2.x), this was achievable through the runtime library, allowing access to the invocation context and authentication context as described in the documentation.
However, in the newer versions, it appears that the equivalent for the invocation context is http:RequestContext, which I have not found a way to access externally.
Is it possible to access the context of a service invocation directly from the runtime without passing it through a function?
Upvotes: 0
Views: 76
Reputation: 31
Ballerina Swan Lake does not support the invocation context from runtime. The service specific configuration classes can be used to pass the context information alternatively. This gives more control over the code.
If you need to use the authentication context through the service invocation, please consider using the ballerina/auth
module. You can refer to the following.
Upvotes: 0