Class AuthorizationController

  • All Implemented Interfaces:
    ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LoginWithPasswordEmailAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LoginWithPasswordUsernameAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LogoutEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.RefreshTokenEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorOneStepWithPasswordEmailAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorOneStepWithPasswordPhoneAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorOneStepWithPasswordUsernameAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationEmailConfirmationAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationEmailInitAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationPhoneNumberConfirmationAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationPhoneNumberInitAuthorizationEndpoint, ru.foodtechlab.lib.auth.service.facade.authorization.resources.AuthorizationResource, ru.foodtechlab.lib.auth.service.facade.authorization.resources.BasicAuthorizationResource

    @RestController
    @Component
    public class AuthorizationController
    extends Object
    implements ru.foodtechlab.lib.auth.service.facade.authorization.resources.AuthorizationResource
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> emailAuthorization​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.BasicEmailAuthorizationRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> emailAuthorization​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.EmailAuthorizationRequest request)  
      com.rcore.rest.api.commons.response.OkApiResponse logout​(String accessToken)  
      com.rcore.rest.api.commons.response.OkApiResponse logout​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.LogoutRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> phoneAuthorization​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.PhoneNumberAuthorizationRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> refreshToken​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.RefreshTokenRequest refreshTokenRequest)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.ConfirmationCodeTimerResponse> signUpByEmail​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpByEmailRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.ConfirmationCodeTimerResponse> signUpByPhoneNumber​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpByPhoneNumberRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> signUpConfirmationByEmail​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpConfirmationByEmailRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> signUpConfirmationByPhoneNumber​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpConfirmationByPhoneNumberRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> usernameAuthorization​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.BasicUsernameAuthorizationRequest request)  
      com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> usernameAuthorization​(ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.UsernameAuthorizationRequest request)  
    • Constructor Detail

      • AuthorizationController

        public AuthorizationController()
    • Method Detail

      • emailAuthorization

        @PostMapping("/not-secure/api/v1/auth/login/email")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> emailAuthorization​(@RequestBody
                                                                                                                                                                                        ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.BasicEmailAuthorizationRequest request)
        Specified by:
        emailAuthorization in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LoginWithPasswordEmailAuthorizationEndpoint
      • usernameAuthorization

        @PostMapping("/not-secure/api/v1/auth/login/password")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> usernameAuthorization​(@RequestBody
                                                                                                                                                                                           ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.BasicUsernameAuthorizationRequest request)
        Specified by:
        usernameAuthorization in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LoginWithPasswordUsernameAuthorizationEndpoint
      • usernameAuthorization

        @PostMapping("/not-secure/api/v1/auth/single-factor/one-step/with-password/username")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> usernameAuthorization​(@RequestBody
                                                                                                                                                                                           ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.UsernameAuthorizationRequest request)
        Specified by:
        usernameAuthorization in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorOneStepWithPasswordUsernameAuthorizationEndpoint
      • logout

        @GetMapping("/not-secure/api/v1/auth/logout")
        public com.rcore.rest.api.commons.response.OkApiResponse logout​(@RequestHeader("X-Auth-Token")
                                                                        String accessToken)
        Specified by:
        logout in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LogoutEndpoint
      • logout

        @PostMapping("/not-secure/api/v1/auth/logout")
        public com.rcore.rest.api.commons.response.OkApiResponse logout​(@RequestBody
                                                                        ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.LogoutRequest request)
        Specified by:
        logout in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.LogoutEndpoint
      • refreshToken

        @PostMapping("/not-secure/api/v1/auth/refresh")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> refreshToken​(@RequestBody
                                                                                                                                                                                  ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.RefreshTokenRequest refreshTokenRequest)
        Specified by:
        refreshToken in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.RefreshTokenEndpoint
      • emailAuthorization

        @PostMapping("/not-secure/api/v1/auth/single-factor/one-step/with-password/email")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> emailAuthorization​(@RequestBody
                                                                                                                                                                                        ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.EmailAuthorizationRequest request)
        Specified by:
        emailAuthorization in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorOneStepWithPasswordEmailAuthorizationEndpoint
      • phoneAuthorization

        @PostMapping("/not-secure/api/v1/auth/single-factor/one-step/with-password/phone")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> phoneAuthorization​(@RequestBody
                                                                                                                                                                                        ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.PhoneNumberAuthorizationRequest request)
        Specified by:
        phoneAuthorization in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorOneStepWithPasswordPhoneAuthorizationEndpoint
      • signUpConfirmationByEmail

        @PostMapping("/not-secure/api/v1/auth/single-factor/two-steps/with-confirmation/email/confirm")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> signUpConfirmationByEmail​(@RequestBody
                                                                                                                                                                                               ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpConfirmationByEmailRequest request)
        Specified by:
        signUpConfirmationByEmail in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationEmailConfirmationAuthorizationEndpoint
      • signUpByEmail

        @PostMapping("/not-secure/api/v1/auth/single-factor/two-steps/with-confirmation/email/init")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.ConfirmationCodeTimerResponse> signUpByEmail​(@RequestBody
                                                                                                                                                                                      ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpByEmailRequest request)
        Specified by:
        signUpByEmail in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationEmailInitAuthorizationEndpoint
      • signUpConfirmationByPhoneNumber

        @PostMapping("/not-secure/api/v1/auth/single-factor/two-steps/with-confirmation/phone/confirm")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.BasicAuthorizationResponse> signUpConfirmationByPhoneNumber​(@RequestBody
                                                                                                                                                                                                     ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpConfirmationByPhoneNumberRequest request)
        Specified by:
        signUpConfirmationByPhoneNumber in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationPhoneNumberConfirmationAuthorizationEndpoint
      • signUpByPhoneNumber

        @PostMapping("/not-secure/api/v1/auth/single-factor/two-steps/with-confirmation/phone/init")
        public com.rcore.rest.api.commons.response.SuccessApiResponse<ru.foodtechlab.lib.auth.service.facade.authorization.dto.responses.ConfirmationCodeTimerResponse> signUpByPhoneNumber​(@RequestBody
                                                                                                                                                                                            ru.foodtechlab.lib.auth.service.facade.authorization.dto.requests.SignUpByPhoneNumberRequest request)
        Specified by:
        signUpByPhoneNumber in interface ru.foodtechlab.lib.auth.service.facade.authorization.endpoints.SingleFactorTwoStepsWithConfirmationPhoneNumberInitAuthorizationEndpoint