org.apache.accumulo.core.client.security.tokens
Class PasswordToken
java.lang.Object
org.apache.accumulo.core.client.security.tokens.PasswordToken
- All Implemented Interfaces:
- Cloneable, Destroyable, AuthenticationToken, org.apache.hadoop.io.Writable
- Direct Known Subclasses:
- SystemToken
public class PasswordToken
- extends Object
- implements AuthenticationToken
- Since:
- 1.5.0
PasswordToken
public PasswordToken()
- Constructor for use with
Writable
. Call readFields(DataInput)
.
PasswordToken
public PasswordToken(CharSequence password)
- Constructs a token from a copy of the password. Destroying the argument after construction will not destroy the copy in this token, and destroying this
token will only destroy the copy held inside this token, not the argument.
Password tokens created with this constructor will store the password as UTF-8 bytes.
PasswordToken
public PasswordToken(byte[] password)
- Constructs a token from a copy of the password. Destroying the argument after construction will not destroy the copy in this token, and destroying this
token will only destroy the copy held inside this token, not the argument.
PasswordToken
public PasswordToken(ByteBuffer password)
- Constructs a token from a copy of the password. Destroying the argument after construction will not destroy the copy in this token, and destroying this
token will only destroy the copy held inside this token, not the argument.
getPassword
public byte[] getPassword()
readFields
public void readFields(DataInput arg0)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
write
public void write(DataOutput arg0)
throws IOException
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
destroy
public void destroy()
throws DestroyFailedException
- Specified by:
destroy
in interface Destroyable
- Throws:
DestroyFailedException
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interface Destroyable
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
clone
public PasswordToken clone()
- Specified by:
clone
in interface AuthenticationToken
- Overrides:
clone
in class Object
init
public void init(AuthenticationToken.Properties properties)
- Specified by:
init
in interface AuthenticationToken
getProperties
public Set<AuthenticationToken.TokenProperty> getProperties()
- Specified by:
getProperties
in interface AuthenticationToken
Copyright © 2013 Apache Accumulo Project. All Rights Reserved.