java.lang.Object
org.jclouds.openstack.keystone.v1_1.domain.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 Details

    • id

      protected String id
    • expires

      protected Date expires
  • Constructor Details

    • Token

      protected Token()
    • Token

      public Token(String id, Date expires)
  • Method Details

    • builder

      public static Token.Builder builder()
    • toBuilder

      public Token.Builder toBuilder()
    • 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
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Token that)
      Specified by:
      compareTo in interface Comparable<Token>