Class 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 Detail

      • AccessToken

        public AccessToken()
    • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object