update db
This commit is contained in:
parent
34a0c5f5bb
commit
0a0e627b4a
@ -251,11 +251,11 @@ object Auth {
|
||||
val atResponse = objectMapper.readValue<AuthTokenResponse>(message)
|
||||
val parsed = validateAuthToken(atResponse.accessToken)
|
||||
|
||||
Session.redis.lpush(
|
||||
"AUTH_TOKEN_${parsed.userName}", objectMapper.writeValueAsString(
|
||||
atResponse.copy(createdAt = LocalDateTime.now())
|
||||
)
|
||||
)
|
||||
foundOldAt.authToken = atResponse.accessToken
|
||||
foundOldAt.expiresAt = LocalDateTime.now().plusSeconds(atResponse.expiresIn.toLong())
|
||||
foundOldAt.refreshExpiresAt = LocalDateTime.now().plusSeconds(atResponse.refreshExpiresIn.toLong())
|
||||
foundOldAt.refreshToken = atResponse.refreshToken
|
||||
database.update(foundOldAt)
|
||||
|
||||
ctx.result(atResponse.accessToken).contentType(ContentType.TEXT_PLAIN)
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user