Class Token

  • All Implemented Interfaces:
    Comparable<Token>

    public class Token
    extends Object
    implements Comparable<Token>
    Tokens are valid for a finite duration. The expires attribute denotes the time after which the token will automatically become invalid. A token may be manually revoked before the time identified by the expires attribute; expires predicts a token's maximum possible lifespan but does not guarantee that it will reach that lifespan. Clients are encouraged to cache a token until it expires.
    See Also:
    • Field Detail

      • expires

        protected Date expires
    • Constructor Detail

      • Token

        protected Token()
      • Token

        public Token​(String id,
                     Date expires)
    • Method Detail

      • getId

        public String getId()
        When providing an ID, it is assumed that the token exists in the current OpenStack deployment
        Returns:
        the id of the token in the current OpenStack deployment
      • getExpires

        public Date getExpires()
        Returns:
        the expires of the token
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object