Package org.craftercms.profile.api
Class AccessToken
- java.lang.Object
-
- org.craftercms.profile.api.AccessToken
-
public class AccessToken extends Object
Access token given to applications that need to access the REST API, acting for any tenant of a list.- Author:
- avasquez
-
-
Constructor Summary
Constructors Constructor Description AccessToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getApplication()
Returns the name of the application accessing Crafter Profile.Date
getExpiresOn()
Returns the date of expiration of this token (when it becomes invalid)String
getId()
Returns the ID of the access token.List<TenantPermission>
getTenantPermissions()
Returns the tenant permissions the application has.int
hashCode()
boolean
isMaster()
Returns true if this is a master token.void
setApplication(String application)
Sets the name of the application accessing Crafter Profile.void
setExpiresOn(Date expiresOn)
Sets the date of expiration of this token (when it becomes invalid)void
setId(String id)
Sets the ID of the access token.void
setMaster(boolean master)
Sets if this is a master token.void
setTenantPermissions(List<TenantPermission> tenantPermissions)
Sets the he tenant permissions the application has.String
toString()
-
-
-
Method Detail
-
getId
public String getId()
Returns the ID of the access token.
-
setId
public void setId(String id)
Sets the ID of the access token.- Parameters:
id
- the token's ID
-
getApplication
public String getApplication()
Returns the name of the application accessing Crafter Profile.
-
setApplication
public void setApplication(String application)
Sets the name of the application accessing Crafter Profile.- Parameters:
application
- the application name
-
isMaster
public boolean isMaster()
Returns true if this is a master token. A master token can be used to create and delete other tokens.
-
setMaster
public void setMaster(boolean master)
Sets if this is a master token. A master token can be used to create and delete other tokens.- Parameters:
master
- trues if this should be a master token, false otherwise
-
getTenantPermissions
public List<TenantPermission> getTenantPermissions()
Returns the tenant permissions the application has.
-
setTenantPermissions
public void setTenantPermissions(List<TenantPermission> tenantPermissions)
Sets the he tenant permissions the application has.- Parameters:
tenantPermissions
- the tenant permissions
-
getExpiresOn
public Date getExpiresOn()
Returns the date of expiration of this token (when it becomes invalid)
-
setExpiresOn
public void setExpiresOn(Date expiresOn)
Sets the date of expiration of this token (when it becomes invalid)- Parameters:
expiresOn
- the expiration date of the token
-
-