Package com.hazelcast.security
Class SimpleTokenCredentials
java.lang.Object
com.hazelcast.security.SimpleTokenCredentials
- All Implemented Interfaces:
DataSerializable,IdentifiedDataSerializable,Credentials,TokenCredentials,Serializable
public class SimpleTokenCredentials
extends Object
implements TokenCredentials, IdentifiedDataSerializable
Simple implementation of
Credentials using a raw byte array token.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.getName()Simple implementation which returns"<empty>"fornulltokens and"<token>"for all other tokens.byte[]getToken()Gets the token.inthashCode()voidReads fields from the input streamtoString()voidWrites object fields to output stream
-
Constructor Details
-
SimpleTokenCredentials
public SimpleTokenCredentials() -
SimpleTokenCredentials
public SimpleTokenCredentials(byte[] token)
-
-
Method Details
-
getToken
public byte[] getToken()Gets the token.- Specified by:
getTokenin interfaceTokenCredentials
-
getName
Simple implementation which returns"<empty>"fornulltokens and"<token>"for all other tokens.- Specified by:
getNamein interfaceCredentials
-
writeData
Description copied from interface:DataSerializableWrites object fields to output stream- Specified by:
writeDatain interfaceDataSerializable- Parameters:
out- output- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializableReads fields from the input stream- Specified by:
readDatain interfaceDataSerializable- Parameters:
in- input- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the input stream has been closed.
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryIdin interfaceIdentifiedDataSerializable- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassIdin interfaceIdentifiedDataSerializable- Returns:
- type ID
-
toString
-
hashCode
public int hashCode() -
equals
-