@Entity public class JpaRefreshToken3 extends Object implements Serializable, RefreshToken
Constructor and Description |
---|
JpaRefreshToken3() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getAncestor()
The primary key value of the first refresh token assigned in the current inheritance line.
|
Long |
getExpiration()
The maximum lifespan of a refresh token.
|
String |
getId()
The primary key of the refresh token.
|
Long |
getRotationExpiration()
Refresh token rotation allows for a configurable window of time in which a refresh token may
be used multiple times without failure.
|
int |
hashCode() |
boolean |
isRotated()
Whether or not this refresh token instance has been used as part of a refresh attempt
|
void |
setAncestor(String ancestor) |
void |
setExpiration(Long expiration) |
void |
setId(String id) |
void |
setRotated(boolean isRotated) |
void |
setRotationExpiration(Long rotationExpiration) |
String |
toString() |
public String getId()
RefreshToken
JTI
param in the refresh token
JWT. Note, for a rotatable token, the JTI is two-part. The first segment is the partition
identifier (e.g. see JpaRefreshToken1
as an integer. The second segment is the id
captured in this field.getId
in interface RefreshToken
public String getAncestor()
RefreshToken
RefreshToken.setRotationExpiration(Long)
timeline will result in immediate revocation of the
entire inheritance line of refresh tokens.getAncestor
in interface RefreshToken
public boolean isRotated()
RefreshToken
isRotated
in interface RefreshToken
public Long getRotationExpiration()
RefreshToken
RefreshToken.getAncestor()
is triggered. This window is designed to allow
for system irregularities like network latency or outage in which an application may be
forced to quickly retry a rotation. Represented as milliseconds after epoch.
This value is generally set in
JpaAuthorizedClient.getRefreshTokenRotationIntervalSeconds()
and the system harvests
from there and converts to millis based on the current client being used in the oauth flow.getRotationExpiration
in interface RefreshToken
public Long getExpiration()
RefreshToken
This value is generally set in
JpaAuthorizedClient.getRefreshTokenTimeoutSeconds()
and the system harvest from there and converts to millis based on the current client being
used in the oauth flow.getExpiration
in interface RefreshToken
public void setId(String id)
setId
in interface RefreshToken
RefreshToken.getId()
public void setAncestor(String ancestor)
setAncestor
in interface RefreshToken
RefreshToken.getAncestor()
public void setRotated(boolean isRotated)
setRotated
in interface RefreshToken
RefreshToken.isRotated()
public void setRotationExpiration(Long rotationExpiration)
setRotationExpiration
in interface RefreshToken
RefreshToken.getRotationExpiration()
public void setExpiration(Long expiration)
setExpiration
in interface RefreshToken
RefreshToken.getExpiration()
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.