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 bySecurityCredentialsProviderwhich is specified on node startup in configuration.Getting credentials through
SecurityCredentialsProviderabstraction allows users to provide custom implementations for storing user names and passwords in their environment, possibly in encrypted format. Ignite comes withSecurityCredentialsBasicProviderwhich simply provides the passed inloginandpasswordwhen encryption or custom logic is not required.In addition to
loginandpassword, security credentials allow for specifyinguserObjectas 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 onloginandpassword.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 booleanequals(Object o)ObjectgetLogin()Gets login.ObjectgetPassword()Gets password.@Nullable ObjectgetUserObject()Gets user-specific object.inthashCode()voidreadExternal(ObjectInput in)voidsetLogin(Object login)Sets login.voidsetPassword(Object password)Sets password.voidsetUserObject(@Nullable Object userObj)Sets user-specific object.StringtoString()voidwriteExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
SecurityCredentials
public SecurityCredentials()
Empty constructor required byExternalizable.
-
SecurityCredentials
public SecurityCredentials(String login, String password)
Constructs security credentials based onloginandpassword.- 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:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-