|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.mylutece.util.SecurityUtils
public class SecurityUtils
Util for security parameters
| Constructor Summary | |
|---|---|
SecurityUtils()
|
|
| Method Summary | |
|---|---|
static String |
buildPassword(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strUserPassword)
Build the password depending of the encryption. |
static String |
buildResetConnectionLogUrl(int nInterval,
javax.servlet.http.HttpServletRequest request)
Build an url to reset connection logs for an IP and a given user. |
static String |
checkPasswordForBackOffice(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strPassword,
javax.servlet.http.HttpServletRequest request)
Test a password validity |
static String |
checkPasswordForFrontOffice(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strPassword,
int nUserId)
Test a password validity |
protected static boolean |
checkPasswordFormat(String strPassword,
IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check the format of the password from the entered parameters. |
static Map<String,Object> |
checkSecurityParameters(IUserParameterService parameterService,
Map<String,Object> model,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads a model with base security parameters |
protected static boolean |
checkUserPasswordMinimumLength(String strPassword,
IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check whether a password is long enough. |
static Timestamp |
getAccountMaxValidDate(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Compute the maximum valid date of an account with the current time and the parameters in the database. |
static String[] |
getBannedDomainNames(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get an array containing banned domain names for email adresses |
static boolean |
getBooleanSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
Get the boolean value of a security parameter |
static int |
getIntegerSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
Get the integer value of a security parameter |
static String |
getLargeSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
Get the large value of a security parameter. |
static int |
getMaximumNumberPasswordChange(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the maximum number of time a user can change his password in a given period |
protected static String |
getMessagePasswordFormat(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets the admin message saying that the password does not match the required format |
protected static String |
getMessagePasswordMinimumLength(javax.servlet.http.HttpServletRequest request,
IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the admin message telling the password length is too short. |
static int |
getPasswordDuration(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the password duration |
static int |
getPasswordHistorySize(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the password history size |
static Timestamp |
getPasswordMaxValidDate(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the current maximum valid date of a password from the parameter service. |
static String |
getSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
Get the value of a security parameter |
static int |
getTSWSizePasswordChange(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the size of the time sliding window of passwor change |
static boolean |
isAdvancedSecurityParametersUsed(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the parameter indicating that a password must contain numbers. |
protected static boolean |
isPasswordFormatUsed(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the parameter indicating that a password must contain numbers. |
static void |
removeAdvancedSecurityParameters(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the advanced security parameters |
static void |
updateLargeParameterValue(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strKey,
String strValue)
Updates a parameter from its key with a new value. |
static void |
updateParameterValue(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strKey,
String strValue)
Updates a parameter from its key with a new value. |
static void |
updateSecurityParameters(IUserParameterService parameterService,
javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update security parameters from request parameters |
static void |
useAdvancedSecurityParameters(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Enable advanced security parameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecurityUtils()
| Method Detail |
|---|
public static Map<String,Object> checkSecurityParameters(IUserParameterService parameterService,
Map<String,Object> model,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - The parameter service to usemodel - The base model to loadplugin - The plugin
public static void updateSecurityParameters(IUserParameterService parameterService,
javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter servicerequest - Request to get the parameter fromplugin - The plugin
protected static boolean checkUserPasswordMinimumLength(String strPassword,
IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
strPassword - Password to checkparameterService - Parameter service to get parameters from.plugin - The plugin
protected static String getMessagePasswordMinimumLength(javax.servlet.http.HttpServletRequest request,
IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
request - The requestparameterService - Parameter service to get parameters from.plugin - The plugin
protected static boolean isPasswordFormatUsed(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to get parameters from.plugin - The plugin
public static int getPasswordDuration(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to get parameters from.plugin - The plugin
public static int getPasswordHistorySize(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to get parameters from.plugin - The plugin
public static int getTSWSizePasswordChange(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to get parameters from.plugin - The plugin
public static boolean isAdvancedSecurityParametersUsed(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to get parameters from.plugin - The plugin
public static int getMaximumNumberPasswordChange(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to get parameters from.plugin - The plugin
public static int getIntegerSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
parameterService - Parameter service to useplugin - The pluginstrParameterkey - Key of the security parameter to get
public static boolean getBooleanSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
parameterService - Parameter service to useplugin - The pluginstrParameterkey - Key of the security parameter to get
public static String getSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
parameterService - Parameter service to useplugin - The pluginstrParameterkey - Key of the security parameter to get
public static String getLargeSecurityParameter(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strParameterkey)
parameterService - Parameter service to useplugin - The pluginstrParameterkey - Key of the security parameter to get
protected static boolean checkPasswordFormat(String strPassword,
IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
strPassword - The password to checkparameterService - Parameter service to get parameters from.plugin - The plugin
protected static String getMessagePasswordFormat(javax.servlet.http.HttpServletRequest request,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
request - The requestplugin - The plugin
public static void updateParameterValue(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strKey,
String strValue)
parameterService - Parameter service to useplugin - The pluginstrKey - The key of the parameter to updatestrValue - The new value of the parameter
public static void updateLargeParameterValue(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strKey,
String strValue)
parameterService - Parameter service to useplugin - The pluginstrKey - The key of the parameter to updatestrValue - The new value of the parameter
public static void useAdvancedSecurityParameters(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to useplugin - The plugin
public static void removeAdvancedSecurityParameters(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to useplugin - The plugin
public static Timestamp getPasswordMaxValidDate(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to useplugin - The plugin
public static Timestamp getAccountMaxValidDate(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter service to useplugin - The plugin
public static String checkPasswordForFrontOffice(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strPassword,
int nUserId)
parameterService - Paramter service to useplugin - The pluginstrPassword - The password to test validitynUserId - The id of the user
public static String checkPasswordForBackOffice(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strPassword,
javax.servlet.http.HttpServletRequest request)
parameterService - Parameter service to useplugin - The pluginstrPassword - Password to checkrequest - The request
public static String buildPassword(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
String strUserPassword)
parameterService - The parameter service to useplugin - The pluginstrUserPassword - the password
public static String[] getBannedDomainNames(IUserParameterService parameterService,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
parameterService - Parameter serviceplugin - The plugin
public static String buildResetConnectionLogUrl(int nInterval,
javax.servlet.http.HttpServletRequest request)
nInterval - Interval of time to resetrequest - The request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||