org.apache.hadoop.hbase.security.token
Class AuthenticationTokenIdentifier

java.lang.Object
  extended by org.apache.hadoop.security.token.TokenIdentifier
      extended by org.apache.hadoop.hbase.security.token.AuthenticationTokenIdentifier
All Implemented Interfaces:
org.apache.hadoop.io.Writable

@InterfaceAudience.Private
public class AuthenticationTokenIdentifier
extends org.apache.hadoop.security.token.TokenIdentifier

Represents the identity information stored in an HBase authentication token.


Field Summary
static org.apache.hadoop.io.Text AUTH_TOKEN_TYPE
           
protected  long expirationDate
           
protected  long issueDate
           
protected  int keyId
           
protected  long sequenceNumber
           
protected  String username
           
 
Constructor Summary
AuthenticationTokenIdentifier()
           
AuthenticationTokenIdentifier(String username)
           
AuthenticationTokenIdentifier(String username, int keyId, long issueDate, long expirationDate)
           
 
Method Summary
 boolean equals(Object other)
           
 long getExpirationDate()
           
 long getIssueDate()
           
 int getKeyId()
           
 org.apache.hadoop.io.Text getKind()
           
 long getSequenceNumber()
           
 org.apache.hadoop.security.UserGroupInformation getUser()
           
 String getUsername()
           
 int hashCode()
           
 void readFields(DataInput in)
           
 byte[] toBytes()
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.security.token.TokenIdentifier
getBytes, getTrackingId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTH_TOKEN_TYPE

public static final org.apache.hadoop.io.Text AUTH_TOKEN_TYPE

username

protected String username

keyId

protected int keyId

issueDate

protected long issueDate

expirationDate

protected long expirationDate

sequenceNumber

protected long sequenceNumber
Constructor Detail

AuthenticationTokenIdentifier

public AuthenticationTokenIdentifier()

AuthenticationTokenIdentifier

public AuthenticationTokenIdentifier(String username)

AuthenticationTokenIdentifier

public AuthenticationTokenIdentifier(String username,
                                     int keyId,
                                     long issueDate,
                                     long expirationDate)
Method Detail

getKind

public org.apache.hadoop.io.Text getKind()
Specified by:
getKind in class org.apache.hadoop.security.token.TokenIdentifier

getUser

public org.apache.hadoop.security.UserGroupInformation getUser()
Specified by:
getUser in class org.apache.hadoop.security.token.TokenIdentifier

getUsername

public String getUsername()

getKeyId

public int getKeyId()

getIssueDate

public long getIssueDate()

getExpirationDate

public long getExpirationDate()

getSequenceNumber

public long getSequenceNumber()

toBytes

public byte[] toBytes()

write

public void write(DataOutput out)
           throws IOException
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Throws:
IOException

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.