Class OahRefreshTokenService
java.lang.Object
com.github.catomat0.oauthhelper.jwt.OahRefreshTokenService
-
Constructor Summary
ConstructorsConstructorDescriptionOahRefreshTokenService(org.springframework.data.redis.core.RedisTemplate<String, String> redisTemplate, OahJwtProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleanRedis에 저장된 refresh token과 일치하는지만 확인 (삭제하지 않음).booleanvalidateAndConsume(String userId, String refreshToken) Redis에서 refresh token을 원자적으로 조회+삭제(GETDEL) 후 일치 여부 반환.
-
Constructor Details
-
OahRefreshTokenService
public OahRefreshTokenService(org.springframework.data.redis.core.RedisTemplate<String, String> redisTemplate, OahJwtProperties properties)
-
-
Method Details
-
save
-
get
-
validate
Redis에 저장된 refresh token과 일치하는지만 확인 (삭제하지 않음). -
validateAndConsume
Redis에서 refresh token을 원자적으로 조회+삭제(GETDEL) 후 일치 여부 반환. refresh rotation 시 사용하면 이전 토큰 재사용 방지.요구사항: Redis 6.2 이상 (GETDEL 지원).
-
delete
-