-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Trimming the whitespace for the OAuth2 provider property #17497
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
Conversation
Map<String, Provider> providers) { | ||
String providerId = (configuredProviderId != null) ? configuredProviderId : registrationId; | ||
String providerId = StringUtils | ||
.trimWhitespace((configuredProviderId != null) ? configuredProviderId : registrationId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this logic can be moved a level up to avoid duplication of the trimming logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it doesn't hurt to trim it but I don't think it's possible to have whitespace at the end of the registrationId
since it's a key in the map.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's possible to have whitespace at the end of the registrationId since it's a key in the map
I've just realized this and removed my last comment.
Update `OAuth2ClientPropertiesRegistrationAdapter` to trim whitespace of the "provider" property. See gh-17497
Thanks, @philwebb |
see gh-17487