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

    • AuthenticationController

      public AuthenticationController(com.blueriq.component.api.security.IAuthorisationManager authorisationManager, com.blueriq.component.api.IAquimaSessionsMap sessionManager, SecurityConfigProperties securitySettings, org.springframework.security.web.authentication.session.SessionAuthenticationStrategy sessionAuthenticationStrategy, org.springframework.security.web.context.SecurityContextRepository securityContextRepository)
  • Method Details

    • login

      @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, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
      Throws:
      Exception
    • logOut

      @PostMapping("/logout") public org.springframework.http.ResponseEntity<Object> logOut(org.springframework.security.core.Authentication authentication) throws OpenIdConnectException
      Throws:
      OpenIdConnectException
    • handleAuthenticationException

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

      @Autowired(required=false) public void setOpenIdConnectSettings(OpenIdConnectSettings openIdConnectSettings)