Interface HvlAuthAuthenticationRestService
- All Known Implementing Classes:
HvlAuthAuthenticationRestController
@Validated
@HvlPublicFeignRestService
@FeignClient(name="${hvl.oauth.auth.authentication.service.name:authRestService}",
path="${hvl.oauth.auth.authentication.service.path:/auth}",
url="${hvl.oauth.auth.authentication.service.url:${hvl.oauth.auth.service.url}}")
public interface HvlAuthAuthenticationRestService
A restful service which provides specific methods for authentication cloud.
-
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.
-
Method Details
-
login
@PostMapping(value="/login", consumes="application/json", produces="application/json") 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.- Parameters:
authenticationRequestModel
- the authentication request model- Returns:
- the hvl response
-
completeLoginWithCode
@Validated(Validation.class) @PostMapping(value="/complete-login-with-code", consumes="application/json", produces="application/json") tr.com.havelsan.javarch.service.data.HvlResponse<HvlAuthAuthenticationResponseModel> completeLoginWithCode(@NotNull @Valid @RequestBody @NotNull @Valid HvlAuthVerificationRequestModel verificationRequestModel) Method that login with the given code.- Parameters:
verificationRequestModel
- the verification request model- Returns:
- the hvl response
-
refresh
@GetMapping(value="/refresh", produces="application/json") tr.com.havelsan.javarch.service.data.HvlResponse<String> refresh() throws HvlAuthExceptionThe method that refreshes the existing session.- Returns:
- the hvl response
- Throws:
HvlAuthException
- the hvl auth exception
-
logout
@GetMapping("/logout") tr.com.havelsan.javarch.service.data.HvlResponse<Void> logout(@RequestParam(value="redirect",required=false) String redirect) The method that deletes the current token and redirects to the given page.- Parameters:
redirect
- the redirect url- Returns:
- the hvl response
- Throws:
HvlAuthException
- the hvl auth exception
-
getCaptchaImageString
@PostMapping(value="/captcha-image-string", produces="application/json") tr.com.havelsan.javarch.service.data.HvlResponse<String> getCaptchaImageString()The method that generates the captcha string when captcha is offline.- Returns:
- the hvl response
-