org.jclouds.openstack.keystone.v2_0.domain
Class Token

java.lang.Object
  extended by org.jclouds.openstack.keystone.v2_0.domain.Token
All Implemented Interfaces:
Comparable<Token>

public class Token
extends Object
implements Comparable<Token>

A token is an arbitrary bit of text that is used to access resources. Each token has a scope which describes which resources are accessible with it. A token may be revoked at anytime and is valid for a finite duration.

While Keystone supports token-based authentication in this release, the intention is for it to support additional protocols in the future. The intent is for it to be an integration service foremost, and not a aspire to be a full-fledged identity store and management solution.

Author:
Adrian Cole
See Also:

Nested Class Summary
static class Token.Builder
           
 
Field Summary
protected  Date expires
           
protected  String id
           
protected  Tenant tenant
           
 
Constructor Summary
Token(String id, Date expires, Tenant tenant)
           
 
Method Summary
static Token.Builder builder()
           
 int compareTo(Token that)
           
 boolean equals(Object object)
           
 Date getExpires()
           
 String getId()
          When providing an ID, it is assumed that the token exists in the current OpenStack deployment
 Tenant getTenant()
           
 int hashCode()
           
 Token.Builder toBuilder()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected final String id

expires

protected final Date expires

tenant

protected final Tenant tenant
Constructor Detail

Token

public Token(String id,
             Date expires,
             Tenant tenant)
Method Detail

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

getTenant

public Tenant getTenant()
Returns:
the tenant assigned to 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>


Copyright © 2009-2012 jclouds. All Rights Reserved.