Align stdlib annotations with spec #74
Labels
Area/Security
Issues related to stdlib security
module/auth
Type/Task
Verson/SwanLakeDump
All issues planned for Swan Lake GA release
Milestone
Description:
Some of the annotation values used in stdlib has complex objects. These objects change their states at runtime. This makes impossible to make annotation value to be aligned with a subtype of the one of
true
,map<anydata|readonly>
,map<anydata|readonly>[]
.Spec: https://ballerina.io/spec/lang/2020R1/#section_9.1
Steps to reproduce:
Examples
OutboundOAuth2Provider
OutboundOAuth2Provider
hasOutboundOAuth2CacheEntry
. This entry gets updated in runtime.See: https://github.com/ballerina-platform/ballerina-lang/blob/d12f10e71a3462bde5d0e632c590fb00cd7b45e6/stdlib/oauth2/src/main/ballerina/src/oauth2/outbound_oauth2_provider.bal#L677
How does it become an annotation value
OutboundOAuth2Provider
type includesOutboundAuthProvider
abstract object which in turn included in HTTP configuration annotation.Auth handlers have auth providers:
InboundJwtAuthProvider
This has
cache:Cache jwtCache
.Many objects that include
InboundAuthHandler
has these complex scenarios.Related Issues (optional):
ballerina-platform/ballerina-lang#15533
Suggested Labels (optional):
Area/Language Area/StandardLibs Type/SpecDeviation
The text was updated successfully, but these errors were encountered: