Class BankIdApiController
java.lang.Object
se.swedenconnect.bankid.idp.authn.api.BankIdApiController
REST controller for the BankID backend API.
- Author:
- Martin Lindström, Felix Hellman
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono
<Void> cancelRequest
(jakarta.servlet.http.HttpServletRequest request) API method for cancelling a requestreactor.core.publisher.Mono
<CustomerContactInformation> API method for delivering contact information for customers.reactor.core.publisher.Mono
<FrontendOverrideResponse> Gets theFrontendOverrideResponse
telling the front-end about customizations.byte[]
Gets the provider logotype to be displayed.byte[]
Gets the provider PNG favicon to be displayed.byte[]
Gets the provider SVG favicon to be displayed.reactor.core.publisher.Mono
<SelectedDeviceInformation> getSelectedDevice
(jakarta.servlet.http.HttpServletRequest request) Gets information about the selected device.reactor.core.publisher.Mono
<ApiResponse> API method for making a BankID polling request.reactor.core.publisher.Mono
<ServiceInformation> API method for delivering status information.reactor.core.publisher.Mono
<UiInformation> uiInformation
(jakarta.servlet.http.HttpServletRequest request) API method for delivering UI display information.
-
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 requestqr
- whether to display the QR code- Returns:
- an
ApiResponse
-
getFrontendOverrides
@GetMapping("/api/overrides") public reactor.core.publisher.Mono<FrontendOverrideResponse> getFrontendOverrides()Gets theFrontendOverrideResponse
telling the front-end about customizations.- Returns:
FrontendOverrideResponse
-
getProviderLogotype
@GetMapping(value="/logo.svg", produces="image/svg+xml") @ResponseBody public byte[] getProviderLogotype() throws IOExceptionGets the provider logotype to be displayed.- Returns:
- SVG image as bytes
- Throws:
IOException
- seeIOUtils
method toByteArray(InputStream inputStream)
-
getProviderSvgFavicon
@GetMapping(value="/favicon.svg", produces="image/svg+xml") @ResponseBody public byte[] getProviderSvgFavicon() throws IOExceptionGets the provider SVG favicon to be displayed.- Returns:
- SVG image as bytes
- Throws:
IOException
- seeIOUtils
method toByteArray(InputStream inputStream)
-
getProviderPngFavicon
@GetMapping(value="/favicon.png", produces="image/png") @ResponseBody public byte[] getProviderPngFavicon() throws IOExceptionGets the provider PNG favicon to be displayed.- Returns:
- PNG image as bytes
- Throws:
IOException
- seeIOUtils
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
-