Package de.dlr.proseo.ui.backend
Klasse LoginManager
java.lang.Object
de.dlr.proseo.ui.backend.LoginManager
Management of user login and logout (thread safe)
- Autor:
- Dr. Thomas Bassler
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Log in to prosEOvoid
doLogout()
Log the logged in user out from prosEOGets the authorities granted to the user after loginGets the code of the mission the current user is logged in toGets the mission prefix consisting of the code of the mission the current user is logged in to appended with "-"Gets the password of the logged in usergetRoles()
Get user rolesgetUser()
Gets the name of the logged in user for service authentication (including mission prefix)boolean
Checks whether the logged in user has the given roleboolean
isPasswordStrengthOk
(String password) Test the given password against the configured password strength parameters (length, element groups used)
-
Felddetails
-
MISSION_PREFIX_CHAR
- Siehe auch:
-
-
Konstruktordetails
-
LoginManager
public LoginManager()
-
-
Methodendetails
-
doLogin
Log in to prosEO- Parameter:
username
- the user name for login (without mission prefix; optional, will be requested from standard input, if not set)password
- the password for login (optional, will be requested from standard input, if not set)mission
- the mission to log in to (may be null for user with prosEO Administrator privileges)showLoginMessage
- if true, show a message upon successful login- Gibt zurück:
- true, if the login was successful, false otherwise
-
doLogout
public void doLogout()Log the logged in user out from prosEO -
getUser
Gets the name of the logged in user for service authentication (including mission prefix)- Gibt zurück:
- the user name or null, if no user is logged in
-
getPassword
Gets the password of the logged in user- Gibt zurück:
- the password or null, if no user is logged in
-
getMission
Gets the code of the mission the current user is logged in to- Gibt zurück:
- the mission code or null, if no user is logged in
-
getMissionPrefix
Gets the mission prefix consisting of the code of the mission the current user is logged in to appended with "-"- Gibt zurück:
- the mission prefix or an empty string, if no user is logged in, or if the current user is not logged in to any mission
-
getAuthorities
Gets the authorities granted to the user after login- Gibt zurück:
- the granted authorities
-
hasRole
Checks whether the logged in user has the given role- Parameter:
role
- the role to check- Gibt zurück:
- true, if the respective authority was granted, false otherwise
-
getRoles
Get user roles- Gibt zurück:
- string list with user roles
-
isPasswordStrengthOk
Test the given password against the configured password strength parameters (length, element groups used)- Parameter:
password
- the password to test- Gibt zurück:
- true, if the password conforms to the password rules, false otherwise
-