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 IPasswordEncryption
passwordEncrypt
static String
USER_CODE_KEY
-
Constructor Summary
Constructors Constructor Description SecurityHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
anonymisedIp(String ip)
static boolean
checkGoogleRecaptcha(ContentContext ctx, String response)
static boolean
checkUserAccess(ContentContext ctx)
static void
clearUserCode(ContentContext ctx)
static String
encryptPassword(String pwd)
static String
getUserCode(ContentContext ctx)
static boolean
userAccessPage(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:
MalformedURLException
Exception
-
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
-
-