Skip to content

Commit

Permalink
fix: modify token controller end-point
Browse files Browse the repository at this point in the history
  • Loading branch information
myeongju-kim committed Nov 2, 2022
1 parent 42163f4 commit ace6a3f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequiredArgsConstructor
@RequestMapping("/api/v1/token")
public class JwtController {
private final JwtService jwtService;
@ApiOperation(value="Access Token 새로 발급",notes = "<strong>refresh 토큰이 유효하다면 access 새로 발급</strong>")
@RequestMapping(value="/api/v1/accounts/token", method = RequestMethod.POST)
@PostMapping("")
public ResponseEntity<ServerResponse<AcTokenResponse>> createAccessToken(@RequestHeader("Authorization") String token){
return ResponseEntity.ok().body(jwtService.reissueAcToken(token));
}
Expand Down

0 comments on commit ace6a3f

Please sign in to comment.