Skip to content

Commit

Permalink
Merge pull request #204 from skni-kod/issue-202
Browse files Browse the repository at this point in the history
refactor: #202 change oauth2 token content
  • Loading branch information
KartVen authored Dec 2, 2024
2 parents 73d7091 + d525b0d commit 273d004
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;

import java.time.Instant;
import java.util.Map;

@Component
Expand Down Expand Up @@ -44,8 +45,7 @@ private Authentication toOAuth2LoginAuthenticationToken(OAuth2AuthorizationCodeA
token.getAuthorizationExchange(),
new DefaultOAuth2User(token.getAuthorities(), Map.of("name", token.getName()), "name"),
token.getAuthorities(),
new OAuth2AccessToken(OAuth2AccessToken.TokenType.BEARER, token.getAccessToken().getTokenValue(),
token.getAccessToken().getIssuedAt(), token.getAccessToken().getExpiresAt()),
new OAuth2AccessToken(OAuth2AccessToken.TokenType.BEARER, "tokenValue", Instant.now(), Instant.now()),
token.getRefreshToken()
);
}
Expand Down

0 comments on commit 273d004

Please sign in to comment.