Class ReactiveAuthenticationTemplate<A extends org.springframework.security.core.Authentication>
java.lang.Object
org.bremersee.spring.security.core.ReactiveAuthenticationTemplate<A>
- Type Parameters:
A- the type parameter
- All Implemented Interfaces:
ReactiveAuthenticationOperations<A>
public class ReactiveAuthenticationTemplate<A extends org.springframework.security.core.Authentication>
extends Object
implements ReactiveAuthenticationOperations<A>
The reactive normalized authentication template.
- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new reactive normalized authentication template.ReactiveAuthenticationTemplate(Supplier<ServiceException> unauthenticatedExceptionSupplier) Instantiates a new reactive normalized authentication template. -
Method Summary
Modifier and TypeMethodDescription<R> reactor.core.publisher.Flux<R> manyWithAuthentication(@NonNull Function<A, ? extends org.reactivestreams.Publisher<R>> function) Many with authentication.<R> reactor.core.publisher.Flux<R> manyWithOptionalAuthentication(@NonNull Function<@Nullable A, ? extends org.reactivestreams.Publisher<R>> function) Many with optional authentication flux.<R> reactor.core.publisher.Mono<R> oneWithAuthentication(@NonNull Function<A, ? extends reactor.core.publisher.Mono<R>> function) One with authentication.<R> reactor.core.publisher.Mono<R> oneWithOptionalAuthentication(@NonNull Function<@Nullable A, ? extends reactor.core.publisher.Mono<R>> function) One with optional authentication mono.
-
Constructor Details
-
ReactiveAuthenticationTemplate
public ReactiveAuthenticationTemplate()Instantiates a new reactive normalized authentication template. -
ReactiveAuthenticationTemplate
Instantiates a new reactive normalized authentication template.- Parameters:
unauthenticatedExceptionSupplier- the unauthenticated exception supplier
-
-
Method Details
-
oneWithAuthentication
public <R> reactor.core.publisher.Mono<R> oneWithAuthentication(@NonNull Function<A, ? extends reactor.core.publisher.Mono<R>> function) Description copied from interface:ReactiveAuthenticationOperationsOne with authentication.- Specified by:
oneWithAuthenticationin interfaceReactiveAuthenticationOperations<A extends org.springframework.security.core.Authentication>- Type Parameters:
R- the type parameter- Parameters:
function- the function- Returns:
- the mono
-
oneWithOptionalAuthentication
public <R> reactor.core.publisher.Mono<R> oneWithOptionalAuthentication(@NonNull Function<@Nullable A, ? extends reactor.core.publisher.Mono<R>> function) Description copied from interface:ReactiveAuthenticationOperationsOne with optional authentication mono.- Specified by:
oneWithOptionalAuthenticationin interfaceReactiveAuthenticationOperations<A extends org.springframework.security.core.Authentication>- Type Parameters:
R- the type parameter- Parameters:
function- the function- Returns:
- the mono
-
manyWithAuthentication
public <R> reactor.core.publisher.Flux<R> manyWithAuthentication(@NonNull Function<A, ? extends org.reactivestreams.Publisher<R>> function) Description copied from interface:ReactiveAuthenticationOperationsMany with authentication.- Specified by:
manyWithAuthenticationin interfaceReactiveAuthenticationOperations<A extends org.springframework.security.core.Authentication>- Type Parameters:
R- the type parameter- Parameters:
function- the function- Returns:
- the flux
-
manyWithOptionalAuthentication
public <R> reactor.core.publisher.Flux<R> manyWithOptionalAuthentication(@NonNull Function<@Nullable A, ? extends org.reactivestreams.Publisher<R>> function) Description copied from interface:ReactiveAuthenticationOperationsMany with optional authentication flux.- Specified by:
manyWithOptionalAuthenticationin interfaceReactiveAuthenticationOperations<A extends org.springframework.security.core.Authentication>- Type Parameters:
R- the type parameter- Parameters:
function- the function- Returns:
- the flux
-