Class MuPasswordManagerModule
java.lang.Object
cz.metacentrum.perun.core.impl.modules.pwdmgr.MuPasswordManagerModule
- All Implemented Interfaces:
PasswordManagerModule
Password manager implementation for MU login-namespace. !! It doesn't reuse generic password manager !!
- Author:
- Pavel Zlámal invalid input: '<'zlamal@cesnet.cz>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected char[]protected final intFields inherited from interface cz.metacentrum.perun.core.implApi.modules.pwdmgr.PasswordManagerModule
ALT_PASSWORD_PREFIX, BIRTH_DAY_KEY, BIRTH_NUMBER_KEY, FIRST_NAME_KEY, LAST_NAME_KEY, LOGIN_PREFIX, MAIL_KEY, PASSWORD_KEY, TITLE_AFTER_KEY, TITLE_BEFORE_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidchangePassword(PerunSession sess, String userLogin, String newPassword) voidcheckLoginFormat(PerunSession sess, String login) voidcheckPassword(PerunSession sess, String userLogin, String password) voidcheckPasswordStrength(PerunSession sess, String login, String password) voidcreateAlternativePassword(PerunSession sess, User user, String passwordId, String password) voiddeleteAlternativePassword(PerunSession sess, User user, String passwordId) voiddeletePassword(PerunSession sess, String userLogin) generateAccount(PerunSession session, Map<String, String> parameters) generateRandomPassword(PerunSession sess, String login) handleSponsorship(PerunSession sess, SponsoredUserData userData) Handles member's sponsorship in given namespace.voidreservePassword(PerunSession session, String userLogin, String password) voidreserveRandomPassword(PerunSession session, String userLogin) voidsetIsServiceCaller(ISServiceCaller isServiceCaller) voidvalidatePassword(PerunSession sess, String userLogin, User user) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cz.metacentrum.perun.core.implApi.modules.pwdmgr.PasswordManagerModule
loginExist
-
Field Details
-
randomPasswordLength
protected final int randomPasswordLength- See Also:
-
passwordMinLength
protected final int passwordMinLength- See Also:
-
randomPasswordCharacters
protected char[] randomPasswordCharacters
-
-
Constructor Details
-
MuPasswordManagerModule
public MuPasswordManagerModule()
-
-
Method Details
-
allowISCall
public boolean allowISCall() -
changePassword
public void changePassword(PerunSession sess, String userLogin, String newPassword) throws PasswordStrengthException - Specified by:
changePasswordin interfacePasswordManagerModule- Throws:
PasswordStrengthException
-
checkLoginFormat
- Specified by:
checkLoginFormatin interfacePasswordManagerModule- Throws:
InvalidLoginException
-
checkPassword
- Specified by:
checkPasswordin interfacePasswordManagerModule
-
checkPasswordStrength
public void checkPasswordStrength(PerunSession sess, String login, String password) throws PasswordStrengthException - Specified by:
checkPasswordStrengthin interfacePasswordManagerModule- Throws:
PasswordStrengthException
-
createAlternativePassword
public void createAlternativePassword(PerunSession sess, User user, String passwordId, String password) - Specified by:
createAlternativePasswordin interfacePasswordManagerModule
-
deleteAlternativePassword
- Specified by:
deleteAlternativePasswordin interfacePasswordManagerModule
-
deletePassword
- Specified by:
deletePasswordin interfacePasswordManagerModule
-
generateAccount
public Map<String,String> generateAccount(PerunSession session, Map<String, String> parameters) throws PasswordStrengthException- Specified by:
generateAccountin interfacePasswordManagerModule- Throws:
PasswordStrengthException
-
generateRandomPassword
- Specified by:
generateRandomPasswordin interfacePasswordManagerModule
-
getIsServiceCaller
-
getPasswordTestUco
-
handleSponsorship
public String handleSponsorship(PerunSession sess, SponsoredUserData userData) throws PasswordStrengthException Description copied from interface:PasswordManagerModuleHandles 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.- Specified by:
handleSponsorshipin interfacePasswordManagerModule- 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 namespace
-
reservePassword
- Specified by:
reservePasswordin interfacePasswordManagerModule
-
reserveRandomPassword
- Specified by:
reserveRandomPasswordin interfacePasswordManagerModule
-
setIsServiceCaller
-
validatePassword
public void validatePassword(PerunSession sess, String userLogin, User user) throws InvalidLoginException - Specified by:
validatePasswordin interfacePasswordManagerModule- Throws:
InvalidLoginException
-