Class ApiResponseFactory
java.lang.Object
se.swedenconnect.bankid.idp.authn.api.ApiResponseFactory
Helper class for creating an
ApiResponse
object.- Author:
- Martin Lindström, Felix Hellman
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ApiResponse
create
(BankIdSessionData data, QRGenerator generator, boolean showQr) Creates anApiResponse
.static ApiResponse
static ApiResponse
Creates anApiResponse
indicating a timeout.static ApiResponse
Creates anApiResponse
representing an unknown error.static ApiResponse
Creates anApiResponse
representing a cancelled operation.
-
Constructor Details
-
ApiResponseFactory
public ApiResponseFactory()
-
-
Method Details
-
create
Creates anApiResponse
.- Parameters:
data
- the BankID session datagenerator
- the QR code generator beanshowQr
- whether to display the QR code- Returns:
- an
ApiResponse
-
createErrorResponseTimeExpired
Creates anApiResponse
indicating a timeout.- Returns:
- an
ApiResponse
-
createErrorResponseBankIdServerException
-
createUserCancelResponse
Creates anApiResponse
representing a cancelled operation.- Returns:
- an
ApiResponse
-
createUnknownError
Creates anApiResponse
representing an unknown error. This does not necessarily mean that the error is unknown but should not be presented to the user.- Returns:
- an
ApiResponse
-