Interface PasswordManagerModule
- All Known Implementing Classes:
AdminmetaPasswordManagerModule
,DummyPasswordManagerModule
,EgiuiPasswordManagerModule
,EinfraPasswordManagerModule
,EinfraservicesPasswordManagerModule
,GenericPasswordManagerModule
,IcsmuniczPasswordManagerModule
,LifescienceidusernamePasswordManagerModule
,MuadmPasswordManagerModule
,MuPasswordManagerModule
,SambaduPasswordManagerModule
,SitolaPasswordManagerModule
,VsupPasswordManagerModule
public interface PasswordManagerModule
Interface defining function of password manager module. Each login-namespace in Perun can define own Module.
- Author:
- Pavel Zlámal invalid input: '<'zlamal@cesnet.cz>
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changePassword
(PerunSession sess, String userLogin, String newPassword) void
checkLoginFormat
(PerunSession sess, String login) void
checkPassword
(PerunSession sess, String userLogin, String password) void
checkPasswordStrength
(PerunSession sess, String login, String password) void
createAlternativePassword
(PerunSession sess, User user, String passwordId, String password) void
deleteAlternativePassword
(PerunSession sess, User user, String passwordId) void
deletePassword
(PerunSession sess, String userLogin) generateAccount
(PerunSession sess, Map<String, String> parameters) generateRandomPassword
(PerunSession sess, String login) default String
handleSponsorship
(PerunSession sess, SponsoredUserData userData) Handles member's sponsorship in given namespace.default boolean
loginExist
(PerunSession sess, String login) void
reservePassword
(PerunSession sess, String userLogin, String password) void
reserveRandomPassword
(PerunSession sess, String userLogin) void
validatePassword
(PerunSession sess, String userLogin, User user)
-
Field Details
-
FIRST_NAME_KEY
- See Also:
-
LAST_NAME_KEY
- See Also:
-
TITLE_BEFORE_KEY
- See Also:
-
TITLE_AFTER_KEY
- See Also:
-
BIRTH_DAY_KEY
- See Also:
-
BIRTH_NUMBER_KEY
- See Also:
-
MAIL_KEY
- See Also:
-
PASSWORD_KEY
- See Also:
-
LOGIN_PREFIX
- See Also:
-
ALT_PASSWORD_PREFIX
- See Also:
-
-
Method Details
-
changePassword
void changePassword(PerunSession sess, String userLogin, String newPassword) throws InvalidLoginException, PasswordStrengthException -
checkLoginFormat
- Throws:
InvalidLoginException
-
checkPassword
-
checkPasswordStrength
void checkPasswordStrength(PerunSession sess, String login, String password) throws PasswordStrengthException - Throws:
PasswordStrengthException
-
createAlternativePassword
void createAlternativePassword(PerunSession sess, User user, String passwordId, String password) throws PasswordStrengthException - Throws:
PasswordStrengthException
-
deleteAlternativePassword
-
deletePassword
- Throws:
InvalidLoginException
-
generateAccount
Map<String,String> generateAccount(PerunSession sess, Map<String, String> parameters) throws PasswordStrengthException- Throws:
PasswordStrengthException
-
generateRandomPassword
-
handleSponsorship
default String handleSponsorship(PerunSession sess, SponsoredUserData userData) throws InvalidLoginException, PasswordStrengthException Handles member's sponsorship in given namespace. Returns login, which should be used in the given namespace. This method is usually used to create an account in external systems.- Parameters:
sess
- sessionuserData
- information, about the user for which the sponsorship should be handled- Returns:
- login, or null, if no login was provided nor generated
- Throws:
PasswordStrengthException
- if the password strength is too weak for given namespaceInvalidLoginException
- if the provided login is invalid for the given namespace
-
loginExist
-
reservePassword
void reservePassword(PerunSession sess, String userLogin, String password) throws InvalidLoginException, PasswordStrengthException -
reserveRandomPassword
- Throws:
InvalidLoginException
-
validatePassword
- Throws:
InvalidLoginException
-