Package org.craftercms.profile.api
Class AccessToken
java.lang.Object
org.craftercms.profile.api.AccessToken
Access token given to applications that need to access the REST API, acting for any tenant of a list.
- Author:
- avasquez
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the name of the application accessing Crafter Profile.Returns the date of expiration of this token (when it becomes invalid)getId()Returns the ID of the access token.Returns the tenant permissions the application has.inthashCode()booleanisMaster()Returns true if this is a master token.voidsetApplication(String application) Sets the name of the application accessing Crafter Profile.voidsetExpiresOn(Date expiresOn) Sets the date of expiration of this token (when it becomes invalid)voidSets the ID of the access token.voidsetMaster(boolean master) Sets if this is a master token.voidsetTenantPermissions(List<TenantPermission> tenantPermissions) Sets the he tenant permissions the application has.toString()
-
Constructor Details
-
AccessToken
public AccessToken()
-
-
Method Details
-
getId
Returns the ID of the access token. -
setId
Sets the ID of the access token.- Parameters:
id- the token's ID
-
getApplication
Returns the name of the application accessing Crafter Profile. -
setApplication
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
Returns the tenant permissions the application has. -
setTenantPermissions
Sets the he tenant permissions the application has.- Parameters:
tenantPermissions- the tenant permissions
-
getExpiresOn
Returns the date of expiration of this token (when it becomes invalid) -
setExpiresOn
Sets the date of expiration of this token (when it becomes invalid)- Parameters:
expiresOn- the expiration date of the token
-
equals
-
hashCode
public int hashCode() -
toString
-