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:
CredentialProviderToken
- Since:
- 1.5.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.accumulo.core.client.security.tokens.AuthenticationToken
AuthenticationToken.AuthenticationTokenSerializer, AuthenticationToken.Properties, AuthenticationToken.TokenProperty
-
Constructor Summary
ConstructorDescriptionConstructor for use withWritable
.PasswordToken
(byte[] password) Constructs a token from a copy of the password.PasswordToken
(CharSequence password) Constructs a token from a copy of the password.PasswordToken
(ByteBuffer password) Constructs a token from a copy of the password. -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
destroy()
boolean
byte[]
int
hashCode()
void
init
(AuthenticationToken.Properties properties) boolean
void
readFields
(DataInput arg0) protected void
setPassword
(byte[] password) protected void
setPassword
(CharBuffer charBuffer) void
write
(DataOutput arg0)
-
Constructor Details
-
PasswordToken
public PasswordToken()Constructor for use withWritable
. CallreadFields(DataInput)
. -
PasswordToken
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
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.
-
-
Method Details
-
getPassword
public byte[] getPassword() -
readFields
- Specified by:
readFields
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
write
- Specified by:
write
in interfaceorg.apache.hadoop.io.Writable
- Throws:
IOException
-
destroy
- Specified by:
destroy
in interfaceDestroyable
- Throws:
DestroyFailedException
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceDestroyable
-
hashCode
public int hashCode() -
equals
-
clone
- Specified by:
clone
in interfaceAuthenticationToken
- Overrides:
clone
in classObject
-
setPassword
protected void setPassword(byte[] password) -
setPassword
-
init
- Specified by:
init
in interfaceAuthenticationToken
-
getProperties
- Specified by:
getProperties
in interfaceAuthenticationToken
-