module-ballerina-oauth2 icon indicating copy to clipboard operation
module-ballerina-oauth2 copied to clipboard

Allow the exp claim in IntrospectionResponse to be passed as a string #3202

Open ovindu-a opened this issue 1 year ago • 7 comments
trafficstars

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 avatar Oct 02 '24 18:10 ovindu-a

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 02 '24 18:10 CLAassistant

@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.

MohamedSabthar avatar Oct 03 '24 04:10 MohamedSabthar

Noted @MohamedSabthar, I will make the changes

ovindu-a avatar Oct 03 '24 04:10 ovindu-a

@MohamedSabthar I have made 2 commits

  1. Extracted the parsing code to a function. Also removed the formatting that seems to have been added automatically.
  2. Added a test case to check if a string value is parsed to int.

Please let me know if there are anymore changes

ovindu-a avatar Oct 03 '24 10:10 ovindu-a

@MohamedSabthar I have made 2 commits

  1. Extracted the parsing code to a function. Also removed the formatting that seems to have been added automatically.
  2. 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.

MohamedSabthar avatar Oct 03 '24 11:10 MohamedSabthar

I have resolved the issues mentioned in the most recent commit. @MohamedSabthar

ovindu-a avatar Oct 03 '24 12:10 ovindu-a