Class AuthenticationController

java.lang.Object
com.aquima.web.api.controller.v2.AbstractBaseController
com.aquima.web.api.controller.v2.AuthenticationController

@RestController("v2ApiAuthenticationController") @RequestMapping(path="/api/v2", produces="application/json") @ServerContext public class AuthenticationController extends AbstractBaseController
Controller that handles authentication related actions on the API.
Since:
11.0
Author:
T. Middeldorp
  • Constructor Details Link icon

    • AuthenticationController Link icon

      public AuthenticationController(com.blueriq.component.api.security.IAuthorisationManager authorisationManager, com.blueriq.component.api.IAquimaSessionsMap sessionManager, org.springframework.security.web.authentication.session.SessionAuthenticationStrategy sessionAuthenticationStrategy, org.springframework.security.web.context.SecurityContextRepository securityContextRepository, Optional<com.blueriq.component.api.security.ExternalLogoutProvider> externalLogoutProvider)
  • Method Details Link icon

    • login Link icon

      @PostMapping("/login") public org.springframework.http.ResponseEntity<Void> login(@RequestBody(required=false) com.aquima.web.api.controller.v2.LoginRequest loginRequest, @RequestParam(name="username",required=false) String usernameParam, @RequestParam(name="password",required=false) String passwordParam, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception
      Throws:
      Exception
    • logOut Link icon

      @PostMapping("/logout") public org.springframework.http.ResponseEntity<Object> logOut(org.springframework.security.core.Authentication authentication, jakarta.servlet.http.HttpServletRequest request) throws Exception
      Throws:
      Exception
    • handleAuthenticationException Link icon

      @ExceptionHandler(org.springframework.security.core.AuthenticationException.class) @ResponseStatus(UNAUTHORIZED) @ResponseBody public JsonError handleAuthenticationException(org.springframework.security.core.AuthenticationException exception)