Package live.crowdcontrol.cc4j.websocket
Class UserToken
java.lang.Object
live.crowdcontrol.cc4j.websocket.UserToken
- All Implemented Interfaces:
IUserRecord
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable UserTokenApplicationgetApp()Gets the details for the Application that initialized this token.longgetExp()Gets the Unix epoch seconds timestamp at which this token will expire.@NotNull StringgetId()Gets the user's Crowd Control User ID.@NotNull StringgetJti()@NotNull StringgetName()Gets the user's display name.@NotNull StringGets the ID of the user on theirhome platform.@NotNull ProfileTypeGets the type of profile the user logged in with.getRoles()Gets the user's roles.@NotNull StringgetType()@NotNull StringgetVer()
-
Field Details
-
CCUID_PATTERN
- See Also:
-
-
Constructor Details
-
UserToken
public UserToken(@NotNull @NotNull String type, @NotNull @NotNull String jti, @Pattern("^ccuid-[0-7][0-9a-hjkmnp-tv-z]{25}$") @NotNull @NotNull String ccUID, @NotNull @NotNull String originID, @NotNull @NotNull ProfileType profile, @NotNull @NotNull String name, @NotNull @NotNull List<@NotNull String> roles, @Nullable @Nullable UserTokenApplication app, long exp, @NotNull @NotNull String ver)
-
-
Method Details
-
getType
-
getJti
-
getId
Description copied from interface:IUserRecordGets the user's Crowd Control User ID.- Specified by:
getIdin interfaceIUserRecord- Returns:
- ccUID
-
getName
Description copied from interface:IUserRecordGets the user's display name.- Specified by:
getNamein interfaceIUserRecord- Returns:
- display name
-
getProfile
Description copied from interface:IUserRecordGets the type of profile the user logged in with.- Specified by:
getProfilein interfaceIUserRecord- Returns:
- profile type
-
getOriginId
Description copied from interface:IUserRecordGets the ID of the user on theirhome platform.- Specified by:
getOriginIdin interfaceIUserRecord- Returns:
- origin id
-
getRoles
Gets the user's roles. Some roles includeadmin,ambassador,partner.- Returns:
- list of roles
-
getApp
Gets the details for the Application that initialized this token.- Returns:
- app details or null
-
getExp
public long getExp()Gets the Unix epoch seconds timestamp at which this token will expire.- Returns:
- expiration time in unix epoch seconds
-
getVer
-