Class AuthenticationTokenManager.Token

    • Constructor Detail

      • Token

        protected Token​(Integer id,
                        String type,
                        String comment,
                        Date creationDate,
                        Date endDate,
                        Date lastUpdateDate,
                        Integer nbUsesLeft,
                        Long autoRenewDuration,
                        Set<String> contexts)
        Creates a Token
        Parameters:
        id - The identifier
        type - The type of token
        comment - The comment. Can be null.
        creationDate - The creation date. Can be null.
        endDate - The end date. Can be null.
        lastUpdateDate - The last update date. Can be null.
        nbUsesLeft - nb of uses left for this token (null for no limitation)
        autoRenewDuration - duration that will be added (from "now") each time the token is updated
        contexts - contexts of the token (ressource id for example)
    • Method Detail

      • getId

        public Integer getId()
        Get the token identifier
        Returns:
        The identifier
      • getType

        public String getType()
        Get the token type
        Returns:
        The type
      • getComment

        public String getComment()
        Get the associated creation comment
        Returns:
        The comment or null
      • getCreationDate

        public Date getCreationDate()
        Get the creation date of the token
        Returns:
        The creation date or null
      • getEndDate

        public Date getEndDate()
        Get the end date of the token validity
        Returns:
        The end date or null
      • getLastUpdateDate

        public Date getLastUpdateDate()
        Get the last update date of the token
        Returns:
        The last update date or null
      • getAutoRenewDuration

        public Long getAutoRenewDuration()
        Get the duration which the token should be automatically renewed on each use, in seconds
        Returns:
        The auto renewal duration in seconds or null if not applicable
      • getContexts

        public Set<StringgetContexts()
        Get the context on which the token can be used
        Returns:
        The token contexts or null if not applicable
      • getNbUsesLeft

        public Integer getNbUsesLeft()
        Get the number of uses allowed for this token
        Returns:
        The number of allowed uses or null if not applicable