Class BankIdEventPublisher

java.lang.Object
se.swedenconnect.bankid.idp.authn.events.BankIdEventPublisher

@Service public class BankIdEventPublisher extends Object
The BankID event publisher.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • BankIdEventPublisher

      public BankIdEventPublisher(ApplicationEventPublisher publisher)
      Constructor.
      Parameters:
      publisher - the event publisher
  • Method Details

    • orderResponse

      public BankIdEventPublisher.EventBuilder orderResponse(PollRequest request, OrderResponse response)
      Builds an event after we have received an order (auth or sign) repsonse.
      Parameters:
      request - the polling request
      response - the order response
      Returns:
      an event to be published
    • collectResponse

      public BankIdEventPublisher.EventBuilder collectResponse(PollRequest request, CollectResponse collectResponse)
      Builds an event efter we have received a collect reponse after polling.
      Parameters:
      request - the polling request
      collectResponse - the collect reponse
      Returns:
      an event to be published
    • orderCancellation

      public BankIdEventPublisher.EventBuilder orderCancellation(jakarta.servlet.http.HttpServletRequest request, RelyingPartyData data)
      Builds an event after order cancellation.
      Parameters:
      request - the HTTP servlet request
      data - the RP data
      Returns:
      an event to be published
    • orderCompletion

      public BankIdEventPublisher.EventBuilder orderCompletion(jakarta.servlet.http.HttpServletRequest request, RelyingPartyData data)
      Builds an event after an order has been completed
      Parameters:
      request - the HTTP servlet request
      data - the RP data
      Returns:
      an event to be published
    • userVisibleData

      public BankIdEventPublisher.EventBuilder userVisibleData(jakarta.servlet.http.HttpServletRequest request, UserVisibleData data)
      Builds an event after data to be displayed in the BankID app has been created.
      Parameters:
      request - the HTTP servlet request
      data - the data to display
      Returns:
      an event to be published
    • abortAuthEvent

      public BankIdEventPublisher.EventBuilder abortAuthEvent(jakarta.servlet.http.HttpServletRequest request)
      Builds an event that the authentication has been aborted
      Parameters:
      request - the HTTP servlet request
      Returns:
      an event to be published
    • bankIdErrorEvent

      public BankIdEventPublisher.EventBuilder bankIdErrorEvent(jakarta.servlet.http.HttpServletRequest request, RelyingPartyData data, ErrorCode error, String errorMessage)
      Builds an event to inform about bankid error
    • receivedRequest

      public BankIdEventPublisher.EventBuilder receivedRequest(jakarta.servlet.http.HttpServletRequest request, RelyingPartyData relyingPartyData, PollRequest pollRequest)
      Builds an event to inform about received request