Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.myteam.server.auth.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
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 org.myteam.server.auth.dto.AuthResponse;
import org.myteam.server.global.exception.ErrorResponse;
import org.springframework.web.bind.annotation.PostMapping;



@Tag(name = "관리자 인증 api", description = "관리자 로그인 관련 api")
public class AdminLoginController {
@Operation(summary = "관리자 로그인", description = "관리자가 로그인을 하여 토큰을 받습니다." +
"계정은 username으로 비밀번호는 password를 프로퍼티로 보내주시면됩니다. 사실상 기존의 일반 회원 로그인과" +
"같되 경로만 다르다고 보시면됩니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "로그인 성공", content = @Content(schema = @Schema(implementation = AuthResponse.class))),
@ApiResponse(responseCode = "404", description = "사용자를 찾을 수 없음", content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
@ApiResponse(responseCode = "500", description = "JSON 파싱 오류", content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
})
@PostMapping("api/admin/login")
public void adminLoginController(){
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,8 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR
log.debug("print accessToken: {}", accessToken);
log.debug("print refreshToken: {}", refreshToken);
log.debug("print role: {}", role);
log.info("print role: {}", role);


if(status.equals(MemberRole.ADMIN.name())){
if(role.equals(MemberRole.ADMIN.name())){
redisService.resetRequestCount("LOGIN_ADMIN",username);
}
redisService.putRefreshToken(publicId, refreshToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class AdminController {
private final MemberService memberService;
private final AdminMemberSearchService adminMemberSearchService;

@Operation(summary = "이메일로 회원 조회", description = "관리자가 특정 이메일을 가진 회원을 조회합니다.")
/*@Operation(summary = "이메일로 회원 조회", description = "관리자가 특정 이메일을 가진 회원을 조회합니다.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "회원 정보 조회 성공"),
@ApiResponse(responseCode = "400", description = "잘못된 요청 형식", content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
Expand Down Expand Up @@ -99,7 +99,7 @@ public ResponseEntity<ResponseDto<String>> delete(@RequestBody MemberDeleteReque
"회원 삭제 성공",
null
));
}
}*/

@Operation(summary = "회원 정보들을 조회", description = "각종 조건을 바탕으로 회원 정보들을 조회합니다.")
@ApiResponses(value = {
Expand Down
Loading