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
Constructors Constructor Description AuthenticationController(com.blueriq.component.api.security.IAuthorisationManager authorisationManager, com.blueriq.component.api.IAquimaSessionsMap sessionManager, SecurityConfigProperties securitySettings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonError
handleAuthenticationException(org.springframework.security.core.AuthenticationException exception)
org.springframework.http.ResponseEntity<Void>
login(com.aquima.web.api.controller.v2.LoginRequest loginRequest, String usernameParam, String passwordParam)
org.springframework.http.ResponseEntity<Object>
logOut()
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 Detail
-
AuthenticationController
public AuthenticationController(com.blueriq.component.api.security.IAuthorisationManager authorisationManager, com.blueriq.component.api.IAquimaSessionsMap sessionManager, SecurityConfigProperties securitySettings)
-
-
Method Detail
-
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) throws Exception
- Throws:
Exception
-
logOut
@PostMapping("/logout") public org.springframework.http.ResponseEntity<Object> logOut() throws InvalidOpenIdConfigurationException, IOException, ClientParameterException
-
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)
-
-