module-ballerina-oauth2
module-ballerina-oauth2 copied to clipboard
Allow the exp claim in IntrospectionResponse to be passed as a string #3202
Purpose
This allows the exp value in IntrospectionResponse to have string value as mentioned in issue #3202. I have changed the code in the prepareIntrospectionResponse function to check if the exp value passed in as json is a string and if so it tries to cast it to and int and assign it.
Checklist
- [x] Linked to an issue
- [ ] Updated the changelog
- [ ] Added tests
- [ ] Updated the spec
- [ ] Checked native-image compatibility
@ovindu-a , your solution looks good. I've added a few comments. Let's address them. Please remove any unnecessary formatting changes and keep the PR focused on the implemented logic. Let's also change the PR title to something more descriptive.
Noted @MohamedSabthar, I will make the changes
@MohamedSabthar I have made 2 commits
- Extracted the parsing code to a function. Also removed the formatting that seems to have been added automatically.
- Added a test case to check if a string value is parsed to int.
Please let me know if there are anymore changes
@MohamedSabthar I have made 2 commits
- Extracted the parsing code to a function. Also removed the formatting that seems to have been added automatically.
- Added a test case to check if a string value is parsed to int.
Please let me know if there are anymore changes
Added a few more suggestions, @ovindu-a. Let's address them and get this merged.
I have resolved the issues mentioned in the most recent commit. @MohamedSabthar
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