Skip to content
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

Add Support GenerateOneTimeTokenRequestResolver #16297

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

franticticktick
Copy link
Contributor

Closes gh-16291

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 17, 2024
@rwinch rwinch self-assigned this Jan 21, 2025
@rwinch rwinch added in: web An issue in web modules (web, webmvc) and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 21, 2025
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I've provided feedback inline.

* @param username username
* @param expiresIn one-time token expiration time (seconds)
*/
public GenerateOneTimeTokenRequest(String username, int expiresIn) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change expiresIn to a Duration


private static final int DEFAULT_EXPIRES_IN = 300;

private int expiresIn = DEFAULT_EXPIRES_IN;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to a Duration

private final String username;

private final int expiresIn;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to a Duration

@franticticktick
Copy link
Contributor Author

@rwinch thanks for feedback, all your comments have been resolved.

Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I missed one more thing. Can you please document the changes and ensure to add a link in the What's New section to those changes?

@franticticktick franticticktick force-pushed the gh-16291 branch 2 times, most recently from a5cdaae to 0dba7d6 Compare January 22, 2025 12:20
@franticticktick
Copy link
Contributor Author

Added documentation, @rwinch done :)

@rwinch rwinch merged commit 474b5e1 into spring-projects:main Jan 22, 2025
6 checks passed
@rwinch rwinch added this to the 6.5.0-M2 milestone Jan 22, 2025
@rwinch
Copy link
Member

rwinch commented Jan 22, 2025

Thanks for the PR and your quick attention to changes! This is now merged into main 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize OneTimeToken expire time
3 participants