Interface AccessToken
-
- All Superinterfaces:
java.lang.Cloneable
,PersistenceEntity
public interface AccessToken extends PersistenceEntity
Access Token for access control. An access token has a unique secure token id, and defines a list of access items and permissions. Each access item has a scope that is defined by a module. The scope for accessing an entity is its EntityTypeId.toString().- Since:
- 5.16
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_ACCESS_ITEMS
Property: accessItemsstatic java.lang.String
PROPERTY_GUEST_TOKEN
Property: guestTokenstatic java.lang.String
PROPERTY_NAME
Property: namestatic java.lang.String
PROPERTY_TOKEN_NUMBER
Property: tokenNumberstatic int
STRONG_SECURE_CODE_LEN
Strong secure code length.static int
UUID_LEN
UUID length: 36.static int
VERY_STRONG_SECURE_CODE_LEN
Very strong secure code length.-
Fields inherited from interface com.cmobilecom.af.entity.PersistenceEntity
ID_SEPARATOR, PROPERTY_ID, PROPERTY_INSTANCE, PROPERTY_SELECTED, PROPERTY_SEQUENCE_NO, PROPERTY_VERSION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<AccessItem>
getAccessItems()
Get the list of access items for this token.java.lang.Boolean
getGuestToken()
Is this token a gust token? if true, all guests (not authenticated) will automatically own this token and its associated permissions.java.lang.String
getName()
Get token namejava.lang.String
getTokenNumber()
Get token number.void
setAccessItems(java.util.List<AccessItem> accessItems)
Set the list of access items for this token.void
setGuestToken(java.lang.Boolean guestToken)
Set whether this token is a gust token.void
setName(java.lang.String name)
Set token namevoid
setTokenNumber(java.lang.String tokenNumber)
Set token number-
Methods inherited from interface com.cmobilecom.af.entity.PersistenceEntity
clone, getId, getInstance, getSequenceNo, getVersion, isChanged, isPartiallyInitialized, isPersisted, isSelected, isStatistics, setChanged, setId, setInstance, setPartiallyInitialized, setPersisted, setSelected, setSequenceNo, setStatistics, setVersion
-
-
-
-
Field Detail
-
VERY_STRONG_SECURE_CODE_LEN
static final int VERY_STRONG_SECURE_CODE_LEN
Very strong secure code length. base64 string length, multiple of 4. number of bytes = base64StringLen * 3 / 4. 120 chars * 3 / 4 = 90 bytes (space: 2^720)- Since:
- 5.16
- See Also:
- Constant Field Values
-
STRONG_SECURE_CODE_LEN
static final int STRONG_SECURE_CODE_LEN
Strong secure code length. It can be used along with another code for maximum security. base64 string length, multiple of 4. number of bytes = base64StringLen * 3 / 4. 80 chars * 3 / 4 = 60 bytes (space: 2^480)- Since:
- 5.16
- See Also:
- Constant Field Values
-
UUID_LEN
static final int UUID_LEN
UUID length: 36.- Since:
- 5.16
- See Also:
- Constant Field Values
-
PROPERTY_NAME
static final java.lang.String PROPERTY_NAME
Property: name- See Also:
- Constant Field Values
-
PROPERTY_GUEST_TOKEN
static final java.lang.String PROPERTY_GUEST_TOKEN
Property: guestToken- See Also:
- Constant Field Values
-
PROPERTY_TOKEN_NUMBER
static final java.lang.String PROPERTY_TOKEN_NUMBER
Property: tokenNumber- See Also:
- Constant Field Values
-
PROPERTY_ACCESS_ITEMS
static final java.lang.String PROPERTY_ACCESS_ITEMS
Property: accessItems- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
Get token name- Returns:
- name
-
setName
void setName(java.lang.String name)
Set token name- Parameters:
name
- token name
-
getGuestToken
java.lang.Boolean getGuestToken()
Is this token a gust token? if true, all guests (not authenticated) will automatically own this token and its associated permissions.- Returns:
- true for guest token, false if user needs to be authorized using this token (name and number) to be granted corresponding permissions.
-
setGuestToken
void setGuestToken(java.lang.Boolean guestToken)
Set whether this token is a gust token. If true, all guests (not authenticated) will automatically own this token and be granted to its associated permissions. Otherwise, user needs to be authorized using this token (name and number) to be granted corresponding permissions.- Parameters:
guestToken
- true for guest token, false for non-guest token
-
getTokenNumber
java.lang.String getTokenNumber()
Get token number.- Returns:
- token number
-
setTokenNumber
void setTokenNumber(java.lang.String tokenNumber)
Set token number- Parameters:
tokenNumber
- token number
-
getAccessItems
java.util.List<AccessItem> getAccessItems()
Get the list of access items for this token.- Returns:
- access items
-
setAccessItems
void setAccessItems(java.util.List<AccessItem> accessItems)
Set the list of access items for this token.- Parameters:
accessItems
- a list of access items
-
-