Package com.ultikits.ultitools.entities
Class TokenEntity
java.lang.Object
com.ultikits.ultitools.entities.TokenEntity
Deprecated, for removal: This API element is subject to removal in a future version.
Use CloudAuthManager.login(DeviceLoginListener) for server linking; removed in 6.4.0.
Legacy user OAuth token, no longer issued or stored by UltiCloud protocol v2.
- Scheduled removal version:
- 6.4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDeprecated, for removal: This API element is subject to removal in a future version.private String[]Deprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version.private LongDeprecated, for removal: This API element is subject to removal in a future version.private intDeprecated, for removal: This API element is subject to removal in a future version.private LongDeprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version.private LongDeprecated, for removal: This API element is subject to removal in a future version.private StringDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Decode the JWT payload from access_token and populate the fields.Deprecated, for removal: This API element is subject to removal in a future version.Get the decoded payload information (for debugging).Deprecated, for removal: This API element is subject to removal in a future version.Get the token's expiration time.Deprecated, for removal: This API element is subject to removal in a future version.Get the token's issued-at time.Deprecated, for removal: This API element is subject to removal in a future version.Get the user ID as a string (for compatibility).booleanhasAuthority(String authority) Deprecated, for removal: This API element is subject to removal in a future version.Check whether the user has the given authority.booleanDeprecated, for removal: This API element is subject to removal in a future version.Check whether the token has expired.
-
Field Details
-
access_token
Deprecated, for removal: This API element is subject to removal in a future version. -
refresh_token
Deprecated, for removal: This API element is subject to removal in a future version. -
token_type
Deprecated, for removal: This API element is subject to removal in a future version. -
expires_in
private int expires_inDeprecated, for removal: This API element is subject to removal in a future version. -
scope
Deprecated, for removal: This API element is subject to removal in a future version. -
jti
Deprecated, for removal: This API element is subject to removal in a future version. -
user_id
Deprecated, for removal: This API element is subject to removal in a future version. -
user_name
Deprecated, for removal: This API element is subject to removal in a future version. -
email
Deprecated, for removal: This API element is subject to removal in a future version. -
authorities
Deprecated, for removal: This API element is subject to removal in a future version. -
exp
Deprecated, for removal: This API element is subject to removal in a future version. -
iat
Deprecated, for removal: This API element is subject to removal in a future version. -
client_id
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
TokenEntity
public TokenEntity()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
decodeJwtPayload
public void decodeJwtPayload()Deprecated, for removal: This API element is subject to removal in a future version.Decode the JWT payload from access_token and populate the fields. -
getDecodedInfo
Deprecated, for removal: This API element is subject to removal in a future version.Get the decoded payload information (for debugging).- Returns:
- a string containing the decoded information
-
isExpired
public boolean isExpired()Deprecated, for removal: This API element is subject to removal in a future version.Check whether the token has expired.- Returns:
- true if expired, false if still valid
-
getExpirationDate
Deprecated, for removal: This API element is subject to removal in a future version.Get the token's expiration time.- Returns:
- the expiration time as a Date, or null if not set
-
getIssuedAt
Deprecated, for removal: This API element is subject to removal in a future version.Get the token's issued-at time.- Returns:
- the issued-at time as a Date, or null if not set
-
hasAuthority
Deprecated, for removal: This API element is subject to removal in a future version.Check whether the user has the given authority.- Parameters:
authority- the authority to check- Returns:
- true if the user has that authority, false otherwise
-
getUserIdAsString
Deprecated, for removal: This API element is subject to removal in a future version.Get the user ID as a string (for compatibility).- Returns:
- the user ID as a string, or null if it is null
-