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 -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticationComplete(com.jadaptive.webauthn.server.model.AuthenticationResponse assertionResponse, javax.servlet.http.HttpServletResponse response) Completes a webauthn authentication flow.com.jadaptive.webauthn.server.model.AuthenticationRequestauthenticationStart(String username, javax.servlet.http.HttpServletResponse response) Starts a webauthn authentication flow.voidregisterCreate(com.jadaptive.webauthn.server.model.RegistrationResponse registrationResponse, javax.servlet.http.HttpServletResponse response) Completes a webauthn registration flow.com.jadaptive.webauthn.server.model.RegistrationRequestregisterStart(@Valid com.jadaptive.webauthn.server.user.User user, javax.servlet.http.HttpServletResponse response) Starts a webauthn registration flow.
-
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 aRegistrationRequest. 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 aAssertionRequestWrapper. 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
-