-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow exp claim to have string value #3202
Comments
Hi @MohamedSabthar |
👋 Welcome, @ShatilKhan! 🚀 We're thrilled to have you join the Ballerina Lang community! Whether you're a seasoned developer or just starting your journey with Ballerina, we value your contributions and look forward to collaborating with you.
Remember, no contribution is too small, and your feedback is invaluable. Feel free to ask questions, propose ideas, or report issues. Together, we can make Ballerina even better! |
@ShatilKhan , please review the codebase of the ballerina/oauth2 library, with a specific focus on the |
Thanks! I'm working on it |
A few questions @MohamedSabthar |
@ShatilKhan yes you can use logical operators in if statements. +1 for the idea. |
I've raised an initial PR, will discuss some issues I'm facing there |
Certainly, I'd be happy to help. Could you please provide more details about the issues you're facing with your initial PR? |
@ShatilKhan Are you still working on this? |
Hi @MohamedSabthar, @keizer619 I would like to work on this issue. |
Hi @ovindu-a To help you get started, here are some essential resources:
|
Thank you @keizer619, I will have a look and start working |
@keizer619 I was going through the code in the I believe this should solve the issue as exp isn't changed anywhere else. Please let me know if I am missing anything.
|
Hi @ovindu-a,
|
Ohh right that makes sense. I will implement it. Thanks |
@MohamedSabthar I have made an initial commit. Please let me know if there are any changes to be made |
@ovindu-a, I've added a few comments. Please review and address them. |
Description:
The current implementation of OAuth2 caches the Introspection response if there is an integer value presented for the exp field in the Introspection response and invalidates the cache entry when the token expires.
Describe your problem(s)
If the exp value is not integer value then the response cached for a default time period provided via IntrospectionServerConfig (.ie defaultTokenExpTimeInSeconds field).
Describe your solution(s)
Rather than just setting the expiration to default when it is not Integer we could check whether we can parse the incoming string to Integer and if it is a valid time, we can set it as the expiration, otherwise set it to the default expiration time.
Related Issues (optional):
Suggested Labels (optional):
Suggested Assignees (optional):
The text was updated successfully, but these errors were encountered: