Class ApiResponseFactory

java.lang.Object
se.swedenconnect.bankid.idp.authn.api.ApiResponseFactory

public class ApiResponseFactory extends Object
Helper class for creating an ApiResponse object.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • ApiResponseFactory

      public ApiResponseFactory()
  • Method Details

    • create

      public static ApiResponse create(BankIdSessionData data, QRGenerator generator, boolean showQr)
      Creates an ApiResponse.
      Parameters:
      data - the BankID session data
      generator - the QR code generator bean
      showQr - whether to display the QR code
      Returns:
      an ApiResponse
    • createErrorResponseTimeExpired

      public static ApiResponse createErrorResponseTimeExpired()
      Creates an ApiResponse indicating a timeout.
      Returns:
      an ApiResponse
    • createErrorResponseBankIdServerException

      public static ApiResponse createErrorResponseBankIdServerException()
    • createUserCancelResponse

      public static ApiResponse createUserCancelResponse()
      Creates an ApiResponse representing a cancelled operation.
      Returns:
      an ApiResponse
    • createUnknownError

      public static ApiResponse createUnknownError()
      Creates an ApiResponse 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