Package org.javlo.helper
Class SecurityHelper
- java.lang.Object
-
- org.javlo.helper.SecurityHelper
-
public class SecurityHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static IPasswordEncryptionpasswordEncryptstatic StringUSER_CODE_KEY
-
Constructor Summary
Constructors Constructor Description SecurityHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringanonymisedIp(String ip)static booleancheckGoogleRecaptcha(ContentContext ctx, String response)static booleancheckUserAccess(ContentContext ctx)static voidclearUserCode(ContentContext ctx)static StringencryptPassword(String pwd)static StringgetUserCode(ContentContext ctx)static booleanuserAccessPage(ContentContext ctx, User user, MenuElement page)
-
-
-
Field Detail
-
USER_CODE_KEY
public static final String USER_CODE_KEY
- See Also:
- Constant Field Values
-
passwordEncrypt
public static IPasswordEncryption passwordEncrypt
-
-
Method Detail
-
userAccessPage
public static boolean userAccessPage(ContentContext ctx, User user, MenuElement page)
-
checkGoogleRecaptcha
public static boolean checkGoogleRecaptcha(ContentContext ctx, String response) throws MalformedURLException, Exception
- Throws:
MalformedURLExceptionException
-
checkUserAccess
public static boolean checkUserAccess(ContentContext ctx)
-
clearUserCode
public static void clearUserCode(ContentContext ctx)
-
getUserCode
public static String getUserCode(ContentContext ctx) throws Exception
- Throws:
Exception
-
-