Record Class StateParameter.StateData
java.lang.Object
java.lang.Record
cloud.opencode.base.oauth2.security.StateParameter.StateData
- Record Components:
state- the state parameter value | state 参数值createdAt- the creation timestamp | 创建时间戳
- Enclosing class:
StateParameter
State Data Record
State 数据记录
Holds a state parameter together with its creation timestamp, allowing expiration-based validation.
将 state 参数与其创建时间戳一起保存,允许基于过期的验证。
- Since:
- JDK 25, opencode-base-oauth2 V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanCheck if this state data has expired based on the given maximum age.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StateData
-
-
Method Details
-
isExpired
Check if this state data has expired based on the given maximum age. 检查此 state 数据是否已根据给定的最大年龄过期。- Parameters:
maxAge- the maximum allowed age | 允许的最大年龄- Returns:
- true if the state has expired | 如果 state 已过期返回 true
- Throws:
NullPointerException- if maxAge is null | 如果 maxAge 为 null
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
state
-
createdAt
-