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, SecurityConfigProperties securitySettings, org.springframework.security.web.authentication.session.SessionAuthenticationStrategy sessionAuthenticationStrategy, org.springframework.security.web.context.SecurityContextRepository securityContextRepository) -
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, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) org.springframework.http.ResponseEntity<Object>
logOut
(org.springframework.security.core.Authentication authentication) void
setOpenIdConnectSettings
(OpenIdConnectSettings openIdConnectSettings) Methods inherited from class com.aquima.web.api.controller.v2.AbstractBaseController
clientParametersException, handleConversionException, handleDecisionTreeNotExposedException, handleEmptySymptomException, handleFlowEndedException, handleForbiddenException, handleFunctionParameterException, handleFunctionValidationException, handleFunctionValidationException, handleMethodArgumentTypeMismatchException, handleRequestWardException, handleStartApplicationForbiddenException, handleStartShortcutForbiddenException, handleUnauthorizedException, handleUnknownApplicationException, handleUnknownDecisionTreeException, handleUnknownFlowException, handleUnknownFunctionFlowException, handleUnknownLanguageException, handleUnknownModuleException, handleUnknownSessionException, handleUnknownShortcutException, handleUnknownSubscriptionException, handleUnsupportedOpenApiSpecException, isAuthenticated
-
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)
-