Class AuthenticationController


  • @RestController("apiAuthenticationController")
    @RequestMapping(path="/api/v1",
                    produces="application/json")
    @ServerContext
    public class AuthenticationController
    extends AbstractBaseController
    Controller that handles authentication related actions on the API.
    Since:
    9.2
    Author:
    T. Middeldorp
    • Constructor Detail

      • AuthenticationController

        public AuthenticationController​(com.blueriq.component.api.security.IAuthorisationManager authorisationManager,
                                        com.blueriq.component.api.IAquimaSessionsMap sessionManager)
    • Method Detail

      • login

        @PostMapping("/login")
        public org.springframework.http.ResponseEntity<Void> login​(org.springframework.web.context.request.WebRequest request)
                                                            throws Exception
        Throws:
        Exception
      • logout

        @PostMapping("/logout")
        @ResponseStatus(NO_CONTENT)
        public void logout()
                    throws IOException
        Throws:
        IOException
      • handleAuthenticationException

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