Class WebauthnServerController

java.lang.Object
com.jadaptive.webauthn.server.controller.WebauthnServerController

@RestController @RequestMapping("/api/webauthn") public class WebauthnServerController extends Object
Webauthn relying party server implementation. It has registration and authentication webauthn work flows.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    authenticationComplete(com.jadaptive.webauthn.server.model.AuthenticationResponse assertionResponse, javax.servlet.http.HttpServletResponse response)
    Completes a webauthn authentication flow.
    com.jadaptive.webauthn.server.model.AuthenticationRequest
    authenticationStart(String username, javax.servlet.http.HttpServletResponse response)
    Starts a webauthn authentication flow.
    void
    registerCreate(com.jadaptive.webauthn.server.model.RegistrationResponse registrationResponse, javax.servlet.http.HttpServletResponse response)
    Completes a webauthn registration flow.
    com.jadaptive.webauthn.server.model.RegistrationRequest
    registerStart(@Valid com.jadaptive.webauthn.server.user.User user, javax.servlet.http.HttpServletResponse response)
    Starts a webauthn registration flow.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebauthnServerController

      public WebauthnServerController()
  • Method Details

    • registerStart

      @PostMapping("/register/start") public com.jadaptive.webauthn.server.model.RegistrationRequest registerStart(@RequestBody @Valid @Valid com.jadaptive.webauthn.server.user.User user, javax.servlet.http.HttpServletResponse response) throws IOException
      Starts a webauthn registration flow. If flow has no error it responds with a RegistrationRequest. In case of error bad request header is set with appropriate message.
      Throws:
      IOException
    • registerCreate

      @PostMapping("/register/complete") public void registerCreate(@RequestBody com.jadaptive.webauthn.server.model.RegistrationResponse registrationResponse, javax.servlet.http.HttpServletResponse response) throws IOException
      Completes a webauthn registration flow. If flow has no error it responds with success status. In case of error bad request header is set with appropriate message.
      Throws:
      IOException
    • authenticationStart

      @PostMapping("/authentication/start") public com.jadaptive.webauthn.server.model.AuthenticationRequest authenticationStart(@RequestBody String username, javax.servlet.http.HttpServletResponse response) throws IOException
      Starts a webauthn authentication flow. If flow has no error it responds with a AssertionRequestWrapper. In case of error bad request header is set with appropriate message.
      Throws:
      IOException
    • authenticationComplete

      @PostMapping("/authentication/complete") public void authenticationComplete(@RequestBody com.jadaptive.webauthn.server.model.AuthenticationResponse assertionResponse, javax.servlet.http.HttpServletResponse response) throws IOException
      Completes a webauthn authentication flow. If flow has no error it responds with success status. In case of error bad request header is set with appropriate message.
      Throws:
      IOException