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<io.github.xezzon.zeroweb.auth.JwtClaim>

public record JwtClaimWrapper(io.github.xezzon.zeroweb.auth.JwtClaim value) extends Record implements io.github.xezzon.tao.trait.NewType<io.github.xezzon.zeroweb.auth.JwtClaim>, io.github.xezzon.tao.trait.Into<com.auth0.jwt.JWTCreator.Builder>
JWT载荷包装器
Author:
xezzon
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    用户组
    static final String
    昵称
    static final String
    权限
    static final String
    角色
    static final String
    用户名
  • Constructor Summary

    Constructors
    Constructor
    Description
    JwtClaimWrapper(io.github.xezzon.zeroweb.auth.JwtClaim value)
    Creates an instance of a JwtClaimWrapper record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    from(com.auth0.jwt.interfaces.DecodedJWT jwt)
     
    io.github.xezzon.zeroweb.auth.JwtClaim
    get()
     
    final int
    Returns a hash code value for this object.
    com.auth0.jwt.JWTCreator.Builder
     
    final String
    Returns a string representation of this record class.
    io.github.xezzon.zeroweb.auth.JwtClaim
    Returns the value of the value record component.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • JwtClaimWrapper

      public JwtClaimWrapper(io.github.xezzon.zeroweb.auth.JwtClaim value)
      Creates an instance of a JwtClaimWrapper record class.
      Parameters:
      value - the value for the value record component
  • Method Details

    • get

      public io.github.xezzon.zeroweb.auth.JwtClaim get()
      Specified by:
      get in interface io.github.xezzon.tao.trait.NewType<io.github.xezzon.zeroweb.auth.JwtClaim>
    • into

      public com.auth0.jwt.JWTCreator.Builder into()
      Specified by:
      into in interface io.github.xezzon.tao.trait.Into<com.auth0.jwt.JWTCreator.Builder>
    • from

      public static JwtClaimWrapper from(com.auth0.jwt.interfaces.DecodedJWT jwt)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • value

      public io.github.xezzon.zeroweb.auth.JwtClaim value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component