Class BankIdApiController

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

@RestController public class BankIdApiController extends Object
REST controller for the BankID backend API.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • BankIdApiController

      public BankIdApiController()
  • Method Details

    • getSelectedDevice

      @GetMapping("/api/device") public reactor.core.publisher.Mono<SelectedDeviceInformation> getSelectedDevice(jakarta.servlet.http.HttpServletRequest request)
      Gets information about the selected device.
      Parameters:
      request - the HTTP servlet request
      Returns:
      selected device information
    • poll

      @PostMapping("/api/poll") public reactor.core.publisher.Mono<ApiResponse> poll(jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="qr",defaultValue="false") Boolean qr)
      API method for making a BankID polling request.
      Parameters:
      request - the HTTP servlet request
      qr - whether to display the QR code
      Returns:
      an ApiResponse
    • getFrontendOverrides

      @GetMapping("/api/overrides") public reactor.core.publisher.Mono<FrontendOverrideResponse> getFrontendOverrides()
      Gets the FrontendOverrideResponse telling the front-end about customizations.
      Returns:
      FrontendOverrideResponse
    • getProviderLogotype

      @GetMapping(value="/logo.svg", produces="image/svg+xml") @ResponseBody public byte[] getProviderLogotype() throws IOException
      Gets the provider logotype to be displayed.
      Returns:
      SVG image as bytes
      Throws:
      IOException - see IOUtils method toByteArray(InputStream inputStream)
    • getProviderSvgFavicon

      @GetMapping(value="/favicon.svg", produces="image/svg+xml") @ResponseBody public byte[] getProviderSvgFavicon() throws IOException
      Gets the provider SVG favicon to be displayed.
      Returns:
      SVG image as bytes
      Throws:
      IOException - see IOUtils method toByteArray(InputStream inputStream)
    • getProviderPngFavicon

      @GetMapping(value="/favicon.png", produces="image/png") @ResponseBody public byte[] getProviderPngFavicon() throws IOException
      Gets the provider PNG favicon to be displayed.
      Returns:
      PNG image as bytes
      Throws:
      IOException - see IOUtils method toByteArray(InputStream inputStream)
    • cancelRequest

      @PostMapping("/api/cancel") public reactor.core.publisher.Mono<Void> cancelRequest(jakarta.servlet.http.HttpServletRequest request)
      API method for cancelling a request
      Parameters:
      request - the HTTP servlet request
      Returns:
      nothing
    • serviceInformation

      @GetMapping("/api/status") public reactor.core.publisher.Mono<ServiceInformation> serviceInformation()
      API method for delivering status information.
      Returns:
      the service information
    • uiInformation

      @GetMapping(value="api/ui", produces="application/json") public reactor.core.publisher.Mono<UiInformation> uiInformation(jakarta.servlet.http.HttpServletRequest request)
      API method for delivering UI display information.
      Parameters:
      request - the HTTP servlet request
      Returns:
      UI information
    • customerContactInormationMono

      @GetMapping(value="/api/contact", produces="application/json") public reactor.core.publisher.Mono<CustomerContactInformation> customerContactInormationMono()
      API method for delivering contact information for customers.
      Returns:
      a CustomerContactInformation