Record Class LoginService.LoginResult
java.lang.Object
java.lang.Record
io.leandev.appfuse.security.auth.LoginService.LoginResult
- Record Components:
accessToken- 存取 tokenrefreshToken- opaque Refresh Credential(legacy 組裝才是 JWT)principal- 已認證的主體(殼可 downcast 為自家 adapter 取 wire 欄位)acting- 代行登入結果;無代行關係時 empty(殼據此決定 roles/authorities 的輸出)sessionOptions- 此 family 的 remember/idle policysessionId- Refresh Session family 與 access family 的共同識別
- Enclosing class:
LoginService
public static record LoginService.LoginResult(String accessToken, String refreshToken, AuthPrincipal principal, Optional<LoginActingContributor.ActingLogin> acting, SessionOptions sessionOptions, UUID sessionId)
extends Record
登入結果(引擎級——wire DTO 由消費端殼自 principal/acting 組裝)
-
Constructor Summary
ConstructorsConstructorDescriptionLoginResult(String accessToken, String refreshToken, AuthPrincipal principal, Optional<LoginActingContributor.ActingLogin> acting) Deprecated.LoginResult(String accessToken, String refreshToken, AuthPrincipal principal, Optional<LoginActingContributor.ActingLogin> acting, SessionOptions sessionOptions, UUID sessionId) Creates an instance of aLoginResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.acting()Returns the value of theactingrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theprincipalrecord component.Returns the value of therefreshTokenrecord component.Returns the value of thesessionIdrecord component.Returns the value of thesessionOptionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LoginResult
@Deprecated public LoginResult(String accessToken, String refreshToken, AuthPrincipal principal, Optional<LoginActingContributor.ActingLogin> acting) Deprecated.Source compatibility for downstream tests/adapters not yet passing issuance policy. -
LoginResult
public LoginResult(String accessToken, String refreshToken, AuthPrincipal principal, Optional<LoginActingContributor.ActingLogin> acting, SessionOptions sessionOptions, UUID sessionId) Creates an instance of aLoginResultrecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componentrefreshToken- the value for therefreshTokenrecord componentprincipal- the value for theprincipalrecord componentacting- the value for theactingrecord componentsessionOptions- the value for thesessionOptionsrecord componentsessionId- the value for thesessionIdrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
accessToken
Returns the value of theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
refreshToken
Returns the value of therefreshTokenrecord component.- Returns:
- the value of the
refreshTokenrecord component
-
principal
-
acting
-
sessionOptions
Returns the value of thesessionOptionsrecord component.- Returns:
- the value of the
sessionOptionsrecord component
-
sessionId
-