Package com.hazelcast.security
Class UsernamePasswordCredentials
java.lang.Object
com.hazelcast.security.UsernamePasswordCredentials
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
,Credentials
,PasswordCredentials
,Serializable
public class UsernamePasswordCredentials extends Object implements PasswordCredentials, IdentifiedDataSerializable
Simple implementation of
PasswordCredentials
using
name and password as security attributes.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UsernamePasswordCredentials()
UsernamePasswordCredentials(String username, String password)
-
Method Summary
Modifier and Type Method Description boolean
equals(Object obj)
int
getClassId()
Returns type identifier for this class.int
getFactoryId()
Returns DataSerializableFactory factory ID for this class.String
getName()
String
getPassword()
Gets the password.int
hashCode()
void
readData(ObjectDataInput in)
Reads fields from the input streamvoid
setName(String name)
void
setPassword(String password)
String
toString()
void
writeData(ObjectDataOutput out)
Writes object fields to output stream
-
Constructor Details
-
UsernamePasswordCredentials
public UsernamePasswordCredentials() -
UsernamePasswordCredentials
-
-
Method Details
-
getPassword
Gets the password.- Specified by:
getPassword
in interfacePasswordCredentials
-
setPassword
- Parameters:
password
- the password to set
-
getName
- Specified by:
getName
in interfaceCredentials
-
setName
- Parameters:
name
- the name to set
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
toString
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
hashCode
public int hashCode() -
equals
-