Record Class ClientCredentialsService.TokenResult
java.lang.Object
java.lang.Record
io.leandev.appfuse.security.auth.ClientCredentialsService.TokenResult
- Record Components:
accessToken- 短效存取 tokenexpiresInSeconds- 有效秒數principal- 已認證的 M2M 主體(殼可據此輸出額外欄位或稽核)
- Enclosing class:
ClientCredentialsService
public static record ClientCredentialsService.TokenResult(String accessToken, long expiresInSeconds, AuthPrincipal principal)
extends Record
發放結果(引擎級——wire 回應由
ClientCredentialsTokenResponse.bearer(String, long) 組裝)-
Constructor Summary
ConstructorsConstructorDescriptionTokenResult(String accessToken, long expiresInSeconds, AuthPrincipal principal) Creates an instance of aTokenResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpiresInSecondsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theprincipalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenResult
Creates an instance of aTokenResultrecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componentexpiresInSeconds- the value for theexpiresInSecondsrecord componentprincipal- the value for theprincipalrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
accessToken
Returns the value of theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
expiresInSeconds
public long expiresInSeconds()Returns the value of theexpiresInSecondsrecord component.- Returns:
- the value of the
expiresInSecondsrecord component
-
principal
-