Record Class JwtClaimWrapper
java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.auth.entity.JwtClaimWrapper
- All Implemented Interfaces:
io.github.xezzon.tao.trait.Into<com.auth0.jwt.JWTCreator.Builder>
,io.github.xezzon.tao.trait.NewType<JwtClaim>
public record JwtClaimWrapper(JwtClaim value)
extends Record
implements io.github.xezzon.tao.trait.NewType<JwtClaim>, io.github.xezzon.tao.trait.Into<com.auth0.jwt.JWTCreator.Builder>
JWT载荷包装器
- Author:
- xezzon
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJwtClaimWrapper
(JwtClaim value) Creates an instance of aJwtClaimWrapper
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static JwtClaimWrapper
from
(com.auth0.jwt.interfaces.DecodedJWT jwt) get()
final int
hashCode()
Returns a hash code value for this object.com.auth0.jwt.JWTCreator.Builder
into()
final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Field Details
-
USERNAME_CLAIM
用户名- See Also:
-
NICKNAME_CLAIM
昵称- See Also:
-
ROLES_CLAIM
角色- See Also:
-
GROUPS_CLAIM
用户组- See Also:
-
PERMISSION_CLAIM
权限- See Also:
-
-
Constructor Details
-
JwtClaimWrapper
Creates an instance of aJwtClaimWrapper
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
get
- Specified by:
get
in interfaceio.github.xezzon.tao.trait.NewType<JwtClaim>
-
into
public com.auth0.jwt.JWTCreator.Builder into()- Specified by:
into
in interfaceio.github.xezzon.tao.trait.Into<com.auth0.jwt.JWTCreator.Builder>
-
from
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-