-
Notifications
You must be signed in to change notification settings - Fork 6k
Accept predicate in constructor for JwtIssuerAuthenticationManagerRes… #10002
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,16 @@ public JwtIssuerAuthenticationManagerResolver(Collection<String> trustedIssuers) | |
new TrustedIssuerJwtAuthenticationManagerResolver( | ||
Collections.unmodifiableCollection(trustedIssuers)::contains)); | ||
} | ||
|
||
/** | ||
* Construct a {@link JwtIssuerAuthenticationManagerResolver} using the provided | ||
* parameters | ||
* @param trustedIssuer a predicate to determine whether the issuer should be trusted or not | ||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add |
||
public JwtIssuerAuthenticationManagerResolver(Predicate<String> trustedIssuer) { | ||
this.authenticationManager = new ResolvingAuthenticationManager( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please check for null constructor parameters. You can look at the other constructors as examples. |
||
new TrustedIssuerJwtAuthenticationManagerResolver(trustedIssuer)); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add unit tests in |
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you able to add this same functionality for |
||
/** | ||
* Construct a {@link JwtIssuerAuthenticationManagerResolver} using the provided | ||
|
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.
Will you please update the copyright message to now include
2021
?