Class SecurityCredentials
- java.lang.Object
-
- org.apache.ignite.plugin.security.SecurityCredentials
-
- All Implemented Interfaces:
Externalizable
,Serializable
public class SecurityCredentials extends Object implements Externalizable
Security credentials used for node authentication. Security credentials are provided bySecurityCredentialsProvider
which is specified on node startup in configuration.Getting credentials through
SecurityCredentialsProvider
abstraction allows users to provide custom implementations for storing user names and passwords in their environment, possibly in encrypted format. Ignite comes withSecurityCredentialsBasicProvider
which simply provides the passed inlogin
andpassword
when encryption or custom logic is not required.In addition to
login
andpassword
, security credentials allow for specifyinguserObject
as well, which can be used to pass in any additional information required for authentication.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SecurityCredentials()
Empty constructor required byExternalizable
.SecurityCredentials(String login, String password)
Constructs security credentials based onlogin
andpassword
.SecurityCredentials(String login, String password, @Nullable Object userObj)
Constructs security credentials based onlogin
,password
, and custom user object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Object
getLogin()
Gets login.Object
getPassword()
Gets password.@Nullable Object
getUserObject()
Gets user-specific object.int
hashCode()
void
readExternal(ObjectInput in)
void
setLogin(Object login)
Sets login.void
setPassword(Object password)
Sets password.void
setUserObject(@Nullable Object userObj)
Sets user-specific object.String
toString()
void
writeExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
SecurityCredentials
public SecurityCredentials()
Empty constructor required byExternalizable
.
-
SecurityCredentials
public SecurityCredentials(String login, String password)
Constructs security credentials based onlogin
andpassword
.- Parameters:
login
- Login.password
- Password.
-
-
Method Detail
-
getLogin
public Object getLogin()
Gets login.- Returns:
- Login.
-
setLogin
public void setLogin(Object login)
Sets login.- Parameters:
login
- Login.
-
getPassword
public Object getPassword()
Gets password.- Returns:
- Password.
-
setPassword
public void setPassword(Object password)
Sets password.- Parameters:
password
- Password.
-
getUserObject
@Nullable public @Nullable Object getUserObject()
Gets user-specific object.- Returns:
- User object.
-
setUserObject
public void setUserObject(@Nullable @Nullable Object userObj)
Sets user-specific object.- Parameters:
userObj
- User object.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
-