Package com.aquima.web.api.controller.v2
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 Summary
ConstructorsConstructorDescriptionAuthenticationController
(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 Summary
Modifier and TypeMethodDescriptionhandleAuthenticationException
(org.springframework.security.core.AuthenticationException exception) org.springframework.http.ResponseEntity
<Void> login
(com.aquima.web.api.controller.v2.LoginRequest loginRequest, String usernameParam, String passwordParam, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) org.springframework.http.ResponseEntity
<Object> logOut
(org.springframework.security.core.Authentication authentication, jakarta.servlet.http.HttpServletRequest request) Methods inherited from class com.aquima.web.api.controller.v2.AbstractBaseController
clientParametersException, handleConversionException, handleDecisionTreeNotExposedException, handleEmptySymptomException, handleFlowEndedException, handleForbiddenException, handleFunctionValidationException, handleFunctionValidationException, handleMethodArgumentTypeMismatchException, handleRequestWardException, handleStartApplicationForbiddenException, handleStartShortcutForbiddenException, handleUnauthorizedException, handleUnknownApplicationException, handleUnknownFlowException, handleUnknownFunctionFlowException, handleUnknownLanguageException, handleUnknownModuleException, handleUnknownSessionException, handleUnknownShortcutException, handleUnsupportedOpenApiSpecException, isAuthenticated
-
Constructor Details
-
AuthenticationController
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
-
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, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws Exception - Throws:
Exception
-
logOut
@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
@ExceptionHandler(org.springframework.security.core.AuthenticationException.class) @ResponseStatus(UNAUTHORIZED) @ResponseBody public JsonError handleAuthenticationException(org.springframework.security.core.AuthenticationException exception)
-