mirror of
https://github.com/spring-projects/spring-security.git
synced 2026-04-16 22:10:27 +00:00
Polish gh-18888
This commit is contained in:
parent
8f2a5a7b6e
commit
2ada3f00fa
@ -119,7 +119,7 @@ public final class ServerOAuth2AuthorizedClientExchangeFilterFunction implements
|
||||
"anonymous", "anonymousUser", AuthorityUtils.createAuthorityList("ROLE_USER"));
|
||||
|
||||
private final Mono<Authentication> currentAuthenticationMono = ReactiveSecurityContextHolder.getContext()
|
||||
.mapNotNull(SecurityContext::getAuthentication);
|
||||
.flatMap((ctx) -> Mono.justOrEmpty(ctx.getAuthentication()));
|
||||
|
||||
// @formatter:off
|
||||
private final Mono<String> clientRegistrationIdMono = this.currentAuthenticationMono
|
||||
@ -526,7 +526,7 @@ public final class ServerOAuth2AuthorizedClientExchangeFilterFunction implements
|
||||
* request, which is used to obtain an {@link OAuth2AuthorizedClient}.
|
||||
* @param request the intercepted request, containing HTTP method, URI, headers,
|
||||
* and request attributes
|
||||
* @return the {@link Mono} of the {@link Authentication principal} to be used for
|
||||
* @return a {@link Mono} of the {@link Authentication principal} to be used for
|
||||
* resolving an {@link OAuth2AuthorizedClient}
|
||||
*/
|
||||
Mono<Authentication> resolve(ClientRequest request);
|
||||
|
||||
@ -617,12 +617,12 @@ public final class ServletOAuth2AuthorizedClientExchangeFilterFunction implement
|
||||
public interface PrincipalResolver {
|
||||
|
||||
/**
|
||||
* Resolve a {@link Authentication principal} from the current request, which is
|
||||
* Resolve the {@link Authentication principal} from the current request, which is
|
||||
* used to obtain an {@link OAuth2AuthorizedClient}.
|
||||
* @param request the intercepted request, containing HTTP method, URI, headers,
|
||||
* and request attributes
|
||||
* @return the {@link Mono} of the {@link Authentication principal} to be used for
|
||||
* resolving an {@link OAuth2AuthorizedClient}
|
||||
* @return the {@link Authentication principal} to be used for resolving an
|
||||
* {@link OAuth2AuthorizedClient}
|
||||
*/
|
||||
@Nullable Authentication resolve(ClientRequest request);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user