fix: #190 PostgreSQLを使用しているときにOAuth2クライアントを作成できない問題を修正

This commit is contained in:
usbharu 2023-12-06 18:12:35 +09:00
parent b9ecd2feff
commit b785d241f8
1 changed files with 1 additions and 2 deletions

View File

@ -13,7 +13,6 @@ import org.springframework.security.oauth2.server.authorization.settings.ClientS
import org.springframework.security.oauth2.server.authorization.settings.TokenSettings import org.springframework.security.oauth2.server.authorization.settings.TokenSettings
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import java.time.Duration import java.time.Duration
import java.time.Instant
import java.util.* import java.util.*
@Service @Service
@ -46,7 +45,7 @@ class AppApiServiceImpl(
.tokenSettings( .tokenSettings(
TokenSettings.builder() TokenSettings.builder()
.accessTokenTimeToLive( .accessTokenTimeToLive(
Duration.ofSeconds((Instant.MAX.epochSecond - Instant.now().epochSecond - 10000) / 1000) Duration.ofSeconds(31536000000)
) )
.build() .build()
) )