-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Enable customization of BearerTokenResolver by adding a setter for JwtClaimIssuerConverter on JwtIssuerAuthenticationManagerResolver #9168
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 1 commit
980d355
ef95c69
bba7e27
40d1af9
5dd538e
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 |
|---|---|---|
|
|
@@ -65,7 +65,7 @@ public final class JwtIssuerAuthenticationManagerResolver implements Authenticat | |
|
|
||
| private final AuthenticationManagerResolver<String> issuerAuthenticationManagerResolver; | ||
|
|
||
| private final Converter<HttpServletRequest, String> issuerConverter = new JwtClaimIssuerConverter(); | ||
| private Converter<HttpServletRequest, String> issuerConverter = new JwtClaimIssuerConverter(); | ||
|
|
||
| /** | ||
| * Construct a {@link JwtIssuerAuthenticationManagerResolver} using the provided | ||
|
|
@@ -130,6 +130,16 @@ public AuthenticationManager resolve(HttpServletRequest request) { | |
| return authenticationManager; | ||
| } | ||
|
|
||
| /** | ||
| * Set a custom issuer converter | ||
| * | ||
| * @since 5.5 | ||
| */ | ||
| public void setIssuerConverter(Converter<HttpServletRequest, String> issuerConverter) { | ||
|
||
| Assert.notNull(issuerConverter, "issuerConverter cannot be null"); | ||
| this.issuerConverter = issuerConverter; | ||
| } | ||
|
|
||
| private static class JwtClaimIssuerConverter implements Converter<HttpServletRequest, String> { | ||
|
|
||
| private final BearerTokenResolver resolver = new DefaultBearerTokenResolver(); | ||
jzheaux marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
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 JavaDoc so that it talks about
BearerTokenResolverinstead?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.
Done.