Skip to content

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ public JwtIssuerAuthenticationManagerResolver(Collection<String> trustedIssuers)
new TrustedIssuerJwtAuthenticationManagerResolver(
Copy link
Contributor

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?

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
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add @since 5.6

public JwtIssuerAuthenticationManagerResolver(Predicate<String> trustedIssuer) {
this.authenticationManager = new ResolvingAuthenticationManager(
Copy link
Contributor

Choose a reason for hiding this comment

The 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));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add unit tests in JwtIssuerAuthenticationManagerResolverTests.


Copy link
Contributor

Choose a reason for hiding this comment

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

Are you able to add this same functionality for JwtIssuerReactiveAuthenticationManagerResolver?

/**
* Construct a {@link JwtIssuerAuthenticationManagerResolver} using the provided
Expand Down