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 Details

    • ReactiveAuthenticationTemplate

      public ReactiveAuthenticationTemplate()
      Instantiates a new reactive normalized authentication template.
    • ReactiveAuthenticationTemplate

      public ReactiveAuthenticationTemplate(Supplier<org.bremersee.exception.ServiceException> unauthenticatedExceptionSupplier)
      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: ReactiveAuthenticationOperations
      One with authentication.
      Specified by:
      oneWithAuthentication in interface ReactiveAuthenticationOperations<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: ReactiveAuthenticationOperations
      One with optional authentication mono.
      Specified by:
      oneWithOptionalAuthentication in interface ReactiveAuthenticationOperations<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: ReactiveAuthenticationOperations
      Many with authentication.
      Specified by:
      manyWithAuthentication in interface ReactiveAuthenticationOperations<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: ReactiveAuthenticationOperations
      Many with optional authentication flux.
      Specified by:
      manyWithOptionalAuthentication in interface ReactiveAuthenticationOperations<A extends org.springframework.security.core.Authentication>
      Type Parameters:
      R - the type parameter
      Parameters:
      function - the function
      Returns:
      the flux