Class BankIdService

java.lang.Object
se.swedenconnect.bankid.idp.authn.service.BankIdService

public class BankIdService extends Object
The BankID service. This component is responsible of communicating with the BankID server using the RP API.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • BankIdService

      public BankIdService(BankIdEventPublisher eventPublisher, io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker, BankIdRequestFactory requestFactory, Duration bankIdStartRetryDuration)
      Constructor.
      Parameters:
      eventPublisher - the BankID event publisher
      circuitBreaker - the circuit breaker (for resilliance)
      requestFactory - for generating requests to the BankID server
      bankIdStartRetryDuration - duration to allow retry session start
  • Method Details

    • poll

      public reactor.core.publisher.Mono<ApiResponse> poll(PollRequest request)
      Sends a request to the BankID server. If we don't have a session we initiate an auth or sign operation.
      Parameters:
      request - the PollRequest
      Returns:
      an ApiResponse
    • cancel

      public reactor.core.publisher.Mono<Void> cancel(jakarta.servlet.http.HttpServletRequest request, BankIdSessionState state, RelyingPartyData data)
      Handles a cancelled operation.
      Parameters:
      request - the HTTP servlet request
      state - the BankID session state
      data - the RP
      Returns:
      nothing
    • getServiceInformation

      public reactor.core.publisher.Mono<ServiceInformation> getServiceInformation()
      Delivers service information.
      Returns:
      a ServiceInformation