Class BankIdService
java.lang.Object
se.swedenconnect.bankid.idp.authn.service.BankIdService
The BankID service. This component is responsible of communicating with the BankID server using the RP API.
- Author:
- Martin Lindström, Felix Hellman
-
Constructor Summary
ConstructorDescriptionBankIdService
(BankIdEventPublisher eventPublisher, io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker, BankIdRequestFactory requestFactory, Duration bankIdStartRetryDuration) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono
<Void> cancel
(jakarta.servlet.http.HttpServletRequest request, BankIdSessionState state, RelyingPartyData data) Handles a cancelled operation.reactor.core.publisher.Mono
<ServiceInformation> Delivers service information.reactor.core.publisher.Mono
<ApiResponse> poll
(PollRequest request) Sends a request to the BankID server.
-
Constructor Details
-
BankIdService
public BankIdService(BankIdEventPublisher eventPublisher, io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker, BankIdRequestFactory requestFactory, Duration bankIdStartRetryDuration) Constructor.- Parameters:
eventPublisher
- the BankID event publishercircuitBreaker
- the circuit breaker (for resilliance)requestFactory
- for generating requests to the BankID serverbankIdStartRetryDuration
- duration to allow retry session start
-
-
Method Details
-
poll
Sends a request to the BankID server. If we don't have a session we initiate an auth or sign operation.- Parameters:
request
- thePollRequest
- 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 requeststate
- the BankID session statedata
- the RP- Returns:
- nothing
-
getServiceInformation
Delivers service information.- Returns:
- a
ServiceInformation
-