Class JwtClaim
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
io.github.xezzon.zeroweb.auth.JwtClaim
- All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, JwtClaimOrBuilder, Serializable
public final class JwtClaim
extends com.google.protobuf.GeneratedMessage
implements JwtClaimOrBuilder
自定义 JWT 载荷Protobuf type
io.github.xezzon.zeroweb.auth.JwtClaim- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT, T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic JwtClaimstatic final com.google.protobuf.Descriptors.DescriptorgetEntitlements(int index) 权限com.google.protobuf.ByteStringgetEntitlementsBytes(int index) 权限int权限com.google.protobuf.ProtocolStringList权限longgetExi()令牌有效时长getGroups(int index) 用户组com.google.protobuf.ByteStringgetGroupsBytes(int index) 用户组int用户组com.google.protobuf.ProtocolStringList用户组昵称com.google.protobuf.ByteString昵称com.google.protobuf.Parser<JwtClaim> 用户名com.google.protobuf.ByteString用户名getRoles(int index) 角色com.google.protobuf.ByteStringgetRolesBytes(int index) 角色int角色com.google.protobuf.ProtocolStringList角色intgetSub()用户IDcom.google.protobuf.ByteString用户IDbooleanhasExi()令牌有效时长inthashCode()final booleanstatic JwtClaim.Builderstatic JwtClaim.BuildernewBuilder(JwtClaim prototype) static JwtClaimparseDelimitedFrom(InputStream input) static JwtClaimparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtClaimparseFrom(byte[] data) static JwtClaimparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtClaimparseFrom(com.google.protobuf.ByteString data) static JwtClaimparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtClaimparseFrom(com.google.protobuf.CodedInputStream input) static JwtClaimparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtClaimparseFrom(InputStream input) static JwtClaimparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static JwtClaimparseFrom(ByteBuffer data) static JwtClaimparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<JwtClaim> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtensionMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
SUB_FIELD_NUMBER
public static final int SUB_FIELD_NUMBER- See Also:
-
PREFERRED_USERNAME_FIELD_NUMBER
public static final int PREFERRED_USERNAME_FIELD_NUMBER- See Also:
-
NICKNAME_FIELD_NUMBER
public static final int NICKNAME_FIELD_NUMBER- See Also:
-
ROLES_FIELD_NUMBER
public static final int ROLES_FIELD_NUMBER- See Also:
-
ENTITLEMENTS_FIELD_NUMBER
public static final int ENTITLEMENTS_FIELD_NUMBER- See Also:
-
GROUPS_FIELD_NUMBER
public static final int GROUPS_FIELD_NUMBER- See Also:
-
EXI_FIELD_NUMBER
public static final int EXI_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
getSub
用户ID
string sub = 1;- Specified by:
getSubin interfaceJwtClaimOrBuilder- Returns:
- The sub.
-
getSubBytes
public com.google.protobuf.ByteString getSubBytes()用户ID
string sub = 1;- Specified by:
getSubBytesin interfaceJwtClaimOrBuilder- Returns:
- The bytes for sub.
-
getPreferredUsername
用户名
string preferred_username = 2;- Specified by:
getPreferredUsernamein interfaceJwtClaimOrBuilder- Returns:
- The preferredUsername.
-
getPreferredUsernameBytes
public com.google.protobuf.ByteString getPreferredUsernameBytes()用户名
string preferred_username = 2;- Specified by:
getPreferredUsernameBytesin interfaceJwtClaimOrBuilder- Returns:
- The bytes for preferredUsername.
-
getNickname
昵称
string nickname = 3;- Specified by:
getNicknamein interfaceJwtClaimOrBuilder- Returns:
- The nickname.
-
getNicknameBytes
public com.google.protobuf.ByteString getNicknameBytes()昵称
string nickname = 3;- Specified by:
getNicknameBytesin interfaceJwtClaimOrBuilder- Returns:
- The bytes for nickname.
-
getRolesList
public com.google.protobuf.ProtocolStringList getRolesList()角色
repeated string roles = 4;- Specified by:
getRolesListin interfaceJwtClaimOrBuilder- Returns:
- A list containing the roles.
-
getRolesCount
public int getRolesCount()角色
repeated string roles = 4;- Specified by:
getRolesCountin interfaceJwtClaimOrBuilder- Returns:
- The count of roles.
-
getRoles
角色
repeated string roles = 4;- Specified by:
getRolesin interfaceJwtClaimOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The roles at the given index.
-
getRolesBytes
public com.google.protobuf.ByteString getRolesBytes(int index) 角色
repeated string roles = 4;- Specified by:
getRolesBytesin interfaceJwtClaimOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the roles at the given index.
-
getEntitlementsList
public com.google.protobuf.ProtocolStringList getEntitlementsList()权限
repeated string entitlements = 5;- Specified by:
getEntitlementsListin interfaceJwtClaimOrBuilder- Returns:
- A list containing the entitlements.
-
getEntitlementsCount
public int getEntitlementsCount()权限
repeated string entitlements = 5;- Specified by:
getEntitlementsCountin interfaceJwtClaimOrBuilder- Returns:
- The count of entitlements.
-
getEntitlements
权限
repeated string entitlements = 5;- Specified by:
getEntitlementsin interfaceJwtClaimOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The entitlements at the given index.
-
getEntitlementsBytes
public com.google.protobuf.ByteString getEntitlementsBytes(int index) 权限
repeated string entitlements = 5;- Specified by:
getEntitlementsBytesin interfaceJwtClaimOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the entitlements at the given index.
-
getGroupsList
public com.google.protobuf.ProtocolStringList getGroupsList()用户组
repeated string groups = 6;- Specified by:
getGroupsListin interfaceJwtClaimOrBuilder- Returns:
- A list containing the groups.
-
getGroupsCount
public int getGroupsCount()用户组
repeated string groups = 6;- Specified by:
getGroupsCountin interfaceJwtClaimOrBuilder- Returns:
- The count of groups.
-
getGroups
用户组
repeated string groups = 6;- Specified by:
getGroupsin interfaceJwtClaimOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The groups at the given index.
-
getGroupsBytes
public com.google.protobuf.ByteString getGroupsBytes(int index) 用户组
repeated string groups = 6;- Specified by:
getGroupsBytesin interfaceJwtClaimOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the groups at the given index.
-
hasExi
public boolean hasExi()令牌有效时长
optional int64 exi = 7;- Specified by:
hasExiin interfaceJwtClaimOrBuilder- Returns:
- Whether the exi field is set.
-
getExi
public long getExi()令牌有效时长
optional int64 exi = 7;- Specified by:
getExiin interfaceJwtClaimOrBuilder- Returns:
- The exi.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static JwtClaim parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtClaim parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtClaim parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtClaim parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtClaim parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static JwtClaim parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static JwtClaim parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static JwtClaim parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static JwtClaim parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-