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
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidchangePassword(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 sess, Map<String, String> parameters) generateRandomPassword(PerunSession sess, String login) default StringhandleSponsorship(PerunSession sess, SponsoredUserData userData) Handles member's sponsorship in given namespace.default booleanloginExist(PerunSession sess, String login) voidreservePassword(PerunSession sess, String userLogin, String password) voidreserveRandomPassword(PerunSession sess, String userLogin) voidvalidatePassword(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
-