module-ballerina-jwt
module-ballerina-jwt copied to clipboard
feat: add support for multiple sub claim validation
trafficstars
Purpose
Enable JWT validation against multiple sub claim values, using the same mechanism as the aud claim. This allows defining and validating against a list of acceptable sub values instead of a single one.
Examples
jwt:ValidatorConfig validatorConfig = {
issuer: "wso2",
username: [ "John" , "Sara" ],
clockSkew: 60,
signatureConfig: {
certFile: "/path/to/public.crt"
}
};
jwt:Payload result = check jwt:validate(jwt, validatorConfig);
Checklist
- [ ] Linked to an issue
- [ ] Updated the changelog
- [x] Added tests
- [ ] Updated the spec
- [ ] Checked native-image compatibility
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code