Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/161' into feature/161
Browse files Browse the repository at this point in the history
  • Loading branch information
Programmer-may committed Jan 24, 2024
2 parents e856761 + 9538bd0 commit 6941ce2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package kr.co.fastcampus.yanabada.common.jwt.filter;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import kr.co.fastcampus.yanabada.common.exception.JsonProcessFailedException;
import kr.co.fastcampus.yanabada.common.response.ResponseBody;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.BadCredentialsException;
Expand All @@ -21,8 +16,6 @@
@RequiredArgsConstructor
public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint {

private final ObjectMapper objectMapper;

@Override
public void commence(
HttpServletRequest request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2Authentic
.getUserInfoEndpoint()
.getUserNameAttributeName();

log.info("registrationId={}", registrationId);
log.info("userNameAttributeName={}", userNameAttributeName);

Oauth2Attribute oauth2Attribute = Oauth2Attribute.of(
registrationId, userNameAttributeName, oauth2User.getAttributes()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ private void setValueInCookie(
try {
ResponseCookie cookie = ResponseCookie
.from(key, URLEncoder.encode(value, "UTF-8"))
.secure(secure)
.secure(true)
.path("/")
.sameSite("None")
.build();
response.addHeader("Set-Cookie", cookie.toString());
} catch (UnsupportedEncodingException e) {
Expand Down

0 comments on commit 6941ce2

Please sign in to comment.