Skip to content

Commit

Permalink
chore : 지울 예정 클래스 표서 (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-ho committed Mar 10, 2024
1 parent 24d6be4 commit e028080
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;

// TODO : 사용하지 않을 예정인 클래스
@RequiredArgsConstructor
public class JwtAuthenticationFilter extends UsernamePasswordAuthenticationFilter {

Expand Down Expand Up @@ -59,7 +60,12 @@ private SignInRequest getSignInRequest(ServletInputStream inputStream) throws IO
public void successfulAuthentication(HttpServletRequest request,
HttpServletResponse response, FilterChain chain, Authentication authResult) {

String grantedAuthority = authResult.getAuthorities().stream().findAny().orElseThrow().toString();
String grantedAuthority = authResult.getAuthorities()
.stream()
.findAny()
.orElseThrow()
.toString();

Token jwtToken = tokenService.createToken(authResult.getPrincipal().toString(), grantedAuthority);

response.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, HttpHeaders.AUTHORIZATION);
Expand Down

0 comments on commit e028080

Please sign in to comment.