public final class UserMgmtUtils extends Object implements Serializable
| Modifier and Type | Field and Description | 
|---|---|
static Benutzer | 
ANONYMOUS
Virtueller Benutzer für Fälle, bei denen ein Benutzer benötigt wird, aber keine Anmeldungen notwendig ist. 
 | 
static String | 
DEFAULT_PWD_SYMBOLS  | 
static Benutzer | 
DESIGNER_INITIAL_DUMMY
Virtueller Benutzer für Fälle, bei denen ein Benutzer benötigt wird, aber keine Anmeldungen notwendig ist. 
 | 
static Benutzer | 
DESIGNER_LAST_DUMMY
Virtueller Benutzer für Fälle, bei denen ein Benutzer benötigt wird, aber keine Anmeldungen notwendig ist. 
 | 
static Benutzer | 
DESIGNER_USER
Virtueller Benutzer für Fälle, bei denen ein Benutzer benötigt wird, aber keine Anmeldungen notwendig ist. 
 | 
static Benutzer | 
SETUP
Virtueller Benutzer für Fälle, bei denen ein Benutzer benötigt wird, aber keine Anmeldungen notwendig ist. 
 | 
static Benutzer | 
SYSTEM
Virtueller Benutzer für Fälle, bei denen ein Benutzer benötigt wird, aber keine Anmeldungen notwendig ist. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static boolean | 
checkPassword(String clearTextPassword,
             String encryptedPassword)  | 
static org.pac4j.core.profile.CommonProfile | 
convertToProfile(Benutzer user)  | 
static String | 
dfltBgNameFor(ERollenTyp rolle,
             Locale locale)
Liefert den lokalisierten Standard-Gruppennamen für Benutzer mit der übergebenen Rolle. 
 | 
static String | 
encPwd(String src)
Deprecated. 
 
 | 
static List<org.passay.CharacterRule> | 
filterCharacterRules(List<org.passay.Rule> rules)  | 
static org.passay.LengthRule | 
filterFirstLengthRules(List<org.passay.Rule> rules)  | 
static String | 
genPwd()
Deprecated. 
 
use  
genPwd(List) instead | 
static String | 
genPwd(List<SystemProperty> pwdPolicyConfig)
Generates a password based on the configured system rules 
 | 
static Benutzer | 
getFromProfile(org.pac4j.core.profile.CommonProfile profile)  | 
static List<org.passay.Rule> | 
getPasswordRules(List<SystemProperty> pwdPolicyConfig,
                boolean useDefaultForGen)
Determines the password policy rules set from the persisted system configuration. 
 | 
static int | 
getPasswordStrength(String newPassword,
                   List<org.passay.Rule> rules)
Calculates the password-strength for password ui components. 
 | 
static long | 
getTimeStamp(long addHours,
            long addMinutes)
Liefert einen Zeitstempel (beginnend vom aktuellen Zeitpunkt) zurück, welcher, um die in den Parametern für Stunden
 und Minuten enthalten Werte, erweitert wurde. 
 | 
static String | 
hashPassword(String clearTextPassword)
Paswort-Encryption. 
 | 
static boolean | 
isAnonymousUser(Benutzer user)  | 
static boolean | 
isExternalUser(Benutzer user)  | 
static boolean | 
isInternalUser(Benutzer user)
 | 
static boolean | 
isSetupUser(Benutzer user)  | 
static boolean | 
isSetupUserWithClient(Benutzer user,
                     javax.servlet.http.HttpSession session)  | 
static boolean | 
isSetupUserWithoutClient(Benutzer user,
                        javax.servlet.http.HttpSession session)  | 
static boolean | 
isSystemUser(Benutzer user)  | 
static com.alibaba.fastjson.JSONObject | 
toJSON(Benutzer user,
      List<BenutzerGruppe> userGroups)  | 
static com.alibaba.fastjson.JSONObject | 
toJSON(Benutzer user,
      List<BenutzerGruppe> userGroups,
      org.pac4j.core.profile.CommonProfile prof)  | 
static PasswordValidationResult | 
validatePassword(String password,
                List<SystemProperty> systemConfig)
Validates Passwords 
 | 
static PasswordValidationResult | 
validatePassword(String oldPassword,
                String newPassword,
                List<SystemProperty> systemConfig)
Validates Passwords 
 | 
static PasswordValidationResult | 
validatePassword(String userName,
                String oldPassword,
                String newPassword,
                List<SystemProperty> systemConfig)
Validates Passwords 
 | 
public static final Benutzer ANONYMOUS
public static final Benutzer SYSTEM
public static final Benutzer SETUP
public static final Benutzer DESIGNER_USER
public static final Benutzer DESIGNER_LAST_DUMMY
public static final Benutzer DESIGNER_INITIAL_DUMMY
public static final String DEFAULT_PWD_SYMBOLS
@Deprecated public static String genPwd()
genPwd(List) insteadpublic static String genPwd(List<SystemProperty> pwdPolicyConfig)
pwdPolicyConfig - pwdPolicyConfig a List of SystemPropertys which specify the password policy
 rulespublic static int getPasswordStrength(String newPassword, List<org.passay.Rule> rules)
newPassword - the password to calculate the strength ofrules - a list of system properties which specify the password policy rulesDouble@Deprecated public static String encPwd(String src)
hashPassword(String) and checkPassword(String, String)public static boolean checkPassword(String clearTextPassword, String encryptedPassword)
public static String dfltBgNameFor(ERollenTyp rolle, Locale locale)
public static boolean isSetupUser(Benutzer user)
user - User to check.true if the given user is a setup user (sadmin), who can administrate the system.public static boolean isSetupUserWithoutClient(Benutzer user, javax.servlet.http.HttpSession session)
user - User to check.session - Optional session for retrieving the client.true if the given user is a setup user and has not chosen a client.public static boolean isSetupUserWithClient(Benutzer user, javax.servlet.http.HttpSession session)
user - User to check.session - Optional session for retrieving the client.true if the given user is a setup user and has chosen a client.public static boolean isSystemUser(Benutzer user)
public static boolean isAnonymousUser(Benutzer user)
public static boolean isInternalUser(Benutzer user)
SETUP, ANONYMOUS or
 SYSTEMuser - the user to checktrue if the user is internal, false otherwisepublic static boolean isExternalUser(Benutzer user)
public static long getTimeStamp(long addHours,
                                long addMinutes)
addHours - Stunden, die zum aktuellen Zeitpunkt hinzugezählt werden sollenaddMinutes - Minuten, die zum aktuellen Zeitpunkt hinzugezählt werden sollenpublic static PasswordValidationResult validatePassword(String password, List<SystemProperty> systemConfig)
password - the new passwordsystemConfig - list with system properties, which defines the use password policy rules if list is null or
 empty, the system defined default password policy rules will be usedPasswordValidationResult with validation-status and errorspublic static PasswordValidationResult validatePassword(String oldPassword, String newPassword, List<SystemProperty> systemConfig)
oldPassword - old passwords which should be permitted to use again. May be null or empty.newPassword - the new passwordsystemConfig - list with system properties, which defines the use password policy rules if list is null or
 empty, the system defined default password policy rules will be usedPasswordValidationResult with validation-status and errorspublic static PasswordValidationResult validatePassword(String userName, String oldPassword, String newPassword, List<SystemProperty> systemConfig)
userName - name of the user to permit passwords with username. May be null or empty.oldPassword - old passwords which should be permitted to use again. May be null or empty.newPassword - the new passwordsystemConfig - list with system properties, which defines the use password policy rules if list is null or
 empty, the system defined default password policy rules will be usedPasswordValidationResult with validation-status and errorspublic static List<org.passay.Rule> getPasswordRules(List<SystemProperty> pwdPolicyConfig, boolean useDefaultForGen)
pwdPolicyConfig - List of SystemPropertysuseDefaultForGen - Flag for use functionality in password generation. If no rules configured (in system
 properties or pre default) the rules 'ALPABETICAL' and 'DIGITS' will be returned.Rulespublic static List<org.passay.CharacterRule> filterCharacterRules(List<org.passay.Rule> rules)
public static org.passay.LengthRule filterFirstLengthRules(List<org.passay.Rule> rules)
public static org.pac4j.core.profile.CommonProfile convertToProfile(Benutzer user)
public static Benutzer getFromProfile(org.pac4j.core.profile.CommonProfile profile)
public static com.alibaba.fastjson.JSONObject toJSON(Benutzer user, List<BenutzerGruppe> userGroups)
public static com.alibaba.fastjson.JSONObject toJSON(Benutzer user, List<BenutzerGruppe> userGroups, org.pac4j.core.profile.CommonProfile prof)
Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.