Class HvlAuthAuthenticationRestController
java.lang.Object
tr.com.havelsan.javarch.oauth.auth.starter.controller.HvlAuthAuthenticationRestController
- All Implemented Interfaces:
HvlAuthAuthenticationRestService
@RestController
@RequestMapping("${hvl.oauth.auth.authentication.service.controller-path:/auth}")
@HvlActuatorService(name="hvlAuthAuthenticationRestService",
groupName="hvlAuth")
public class HvlAuthAuthenticationRestController
extends Object
implements HvlAuthAuthenticationRestService
The class in which service endpoints are defined for authentication operations.
-
Constructor Summary
ConstructorDescriptionHvlAuthAuthenticationRestController
(HvlAuthAuthenticationService authenticationService) Instantiates a new HvlAuthRestController. -
Method Summary
Modifier and TypeMethodDescriptiontr.com.havelsan.javarch.service.data.HvlResponse
<HvlAuthAuthenticationResponseModel> completeLoginWithCode
(@NotNull @Valid HvlAuthVerificationRequestModel verificationRequestModel) Method that login with the given code.tr.com.havelsan.javarch.service.data.HvlResponse
<String> The method that generates the captcha string when captcha is offline.tr.com.havelsan.javarch.service.data.HvlResponse
<HvlAuthAuthenticationResponseModel> login
(@NotNull @Valid HvlAuthAuthenticationRequestModel authenticationRequestModel) Method that login with the given username and password.tr.com.havelsan.javarch.service.data.HvlResponse
<Void> The method that deletes the current token and redirects to the given page.tr.com.havelsan.javarch.service.data.HvlResponse
<String> refresh()
The method that refreshes the existing session.
-
Constructor Details
-
HvlAuthAuthenticationRestController
Instantiates a new HvlAuthRestController.- Parameters:
authenticationService
- the auth service
-
-
Method Details
-
login
public tr.com.havelsan.javarch.service.data.HvlResponse<HvlAuthAuthenticationResponseModel> login(@NotNull @Valid @RequestBody @NotNull @Valid HvlAuthAuthenticationRequestModel authenticationRequestModel) Method that login with the given username and password.- Specified by:
login
in interfaceHvlAuthAuthenticationRestService
- Parameters:
authenticationRequestModel
- the authentication request model- Returns:
- the hvl response
-
completeLoginWithCode
@Validated(Validation.class) public tr.com.havelsan.javarch.service.data.HvlResponse<HvlAuthAuthenticationResponseModel> completeLoginWithCode(@NotNull @Valid @RequestBody @NotNull @Valid HvlAuthVerificationRequestModel verificationRequestModel) Method that login with the given code.- Specified by:
completeLoginWithCode
in interfaceHvlAuthAuthenticationRestService
- Parameters:
verificationRequestModel
- the verification request model- Returns:
- the hvl response
-
refresh
The method that refreshes the existing session.- Specified by:
refresh
in interfaceHvlAuthAuthenticationRestService
- Returns:
- the hvl response
-
logout
The method that deletes the current token and redirects to the given page.- Specified by:
logout
in interfaceHvlAuthAuthenticationRestService
- Parameters:
redirect
- the redirect url- Returns:
- the hvl response
-
getCaptchaImageString
The method that generates the captcha string when captcha is offline.- Specified by:
getCaptchaImageString
in interfaceHvlAuthAuthenticationRestService
- Returns:
- the hvl response
-