package com.dbnt.kcscbackend.auth; import com.dbnt.kcscbackend.auth.service.EgovLoginService; import com.dbnt.kcscbackend.config.common.BaseController; import com.dbnt.kcscbackend.auth.entity.LoginVO; import com.dbnt.kcscbackend.config.common.ResponseCode; import com.dbnt.kcscbackend.config.common.ResultVO; import com.dbnt.kcscbackend.config.egov.EgovMessageSource; import com.dbnt.kcscbackend.config.jwt.EgovJwtTokenUtil; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler; import org.springframework.ui.ModelMap; import org.springframework.validation.Errors; import org.springframework.validation.FieldError; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.util.HashMap; import java.util.List; /** * 일반 로그인을 처리하는 컨트롤러 클래스 * @author 공통서비스 개발팀 박지욱 * @since 2009.03.06 * @version 1.0 * @see * *
* << 개정이력(Modification Information) >> * * 수정일 수정자 수정내용 * ------- -------- --------------------------- * 2009.03.06 박지욱 최초 생성 * 2011.08.31 JJY 경량환경 템플릿 커스터마이징버전 생성 * **/ @Slf4j @RestController @RequestMapping("/auth") @Tag(name="EgovLoginApiController",description = "로그인 관련") public class EgovLoginApiController extends BaseController { /** EgovLoginService */ @Resource(name = "loginService") private EgovLoginService loginService; /** EgovMessageSource */ @Resource(name = "egovMessageSource") EgovMessageSource egovMessageSource; /** JWT */ @Autowired private EgovJwtTokenUtil jwtTokenUtil; @Operation( summary = "JWT 로그인", description = "JWT 로그인 처리", tags = {"EgovLoginApiController"} ) @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "가입 성공"), @ApiResponse(responseCode = "300", description = "가입 실패") }) @PostMapping(value = "/join") public HashMap