Polish gh-18888
This commit is contained in:
+2
-2
@@ -119,7 +119,7 @@ public final class ServerOAuth2AuthorizedClientExchangeFilterFunction implements
|
|||||||
"anonymous", "anonymousUser", AuthorityUtils.createAuthorityList("ROLE_USER"));
|
"anonymous", "anonymousUser", AuthorityUtils.createAuthorityList("ROLE_USER"));
|
||||||
|
|
||||||
private final Mono<Authentication> currentAuthenticationMono = ReactiveSecurityContextHolder.getContext()
|
private final Mono<Authentication> currentAuthenticationMono = ReactiveSecurityContextHolder.getContext()
|
||||||
.mapNotNull(SecurityContext::getAuthentication);
|
.flatMap((ctx) -> Mono.justOrEmpty(ctx.getAuthentication()));
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
private final Mono<String> clientRegistrationIdMono = this.currentAuthenticationMono
|
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}.
|
* request, which is used to obtain an {@link OAuth2AuthorizedClient}.
|
||||||
* @param request the intercepted request, containing HTTP method, URI, headers,
|
* @param request the intercepted request, containing HTTP method, URI, headers,
|
||||||
* and request attributes
|
* 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}
|
* resolving an {@link OAuth2AuthorizedClient}
|
||||||
*/
|
*/
|
||||||
Mono<Authentication> resolve(ClientRequest request);
|
Mono<Authentication> resolve(ClientRequest request);
|
||||||
|
|||||||
+3
-3
@@ -617,12 +617,12 @@ public final class ServletOAuth2AuthorizedClientExchangeFilterFunction implement
|
|||||||
public interface PrincipalResolver {
|
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}.
|
* used to obtain an {@link OAuth2AuthorizedClient}.
|
||||||
* @param request the intercepted request, containing HTTP method, URI, headers,
|
* @param request the intercepted request, containing HTTP method, URI, headers,
|
||||||
* and request attributes
|
* and request attributes
|
||||||
* @return the {@link Mono} of the {@link Authentication principal} to be used for
|
* @return the {@link Authentication principal} to be used for resolving an
|
||||||
* resolving an {@link OAuth2AuthorizedClient}
|
* {@link OAuth2AuthorizedClient}
|
||||||
*/
|
*/
|
||||||
@Nullable Authentication resolve(ClientRequest request);
|
@Nullable Authentication resolve(ClientRequest request);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user