Package xal.rbac
Class Credentials
java.lang.Object
xal.rbac.Credentials
Credentials carry the login information. They are created by the
SecurityCallback during the authentication and are discarded immediately
afterwards.
- Author:
- Jakob Battelino Prelog
-
Constructor Summary
ConstructorsConstructorDescriptionCredentials
(String username, char[] password) Constructs new Credentials.Credentials
(String username, char[] password, String preferredRole) Constructs new credentials with fields set to the provided values.Credentials
(String username, char[] password, String preferredRole, String ip) Constructs new credentials with fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptiongetIP()
Returns IP address that will be used for authentication.char[]
Returns password that will be used for authentication.Returns the name of the role the user would prefer to have.Returns username that will be used for authentication.
-
Constructor Details
-
Credentials
Constructs new Credentials. Preferred role and IP are set to null.- Parameters:
username
- the username used for authenticationpassword
- the password used for authentication
-
Credentials
Constructs new credentials with fields set to the provided values. IP is set to null.- Parameters:
username
- that will be used for authentication.password
- that will be used for authentication.preferredRole
- the user would prefer to have.
-
Credentials
Constructs new credentials with fields set to the provided values.- Parameters:
username
- that will be used for authentication.password
- that will be used for authentication.preferredRole
- the user would prefer to have.ip
- address that will be used for authentication.
-
-
Method Details
-
getUsername
Returns username that will be used for authentication.- Returns:
- username that will be used for authentication.
-
getPassword
public char[] getPassword()Returns password that will be used for authentication.- Returns:
- password that will be used for authentication.
-
getPreferredRole
Returns the name of the role the user would prefer to have.- Returns:
- the name of the role the user would prefer to have.
-
getIP
Returns IP address that will be used for authentication.- Returns:
- IP address that will be used for authentication.
-