mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-29 16:14:16 +08:00
use RSA to encrypt login
This commit is contained in:
@@ -12,13 +12,17 @@ import javax.servlet.http.HttpSession;
|
||||
*/
|
||||
public class Checker {
|
||||
|
||||
public static boolean nonNull(Object... v) {
|
||||
for (Object o : v) if (o == null) return false;
|
||||
return true;
|
||||
public static boolean hasNull(Object... v) {
|
||||
for (Object o : v) if (o == null) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean authorized(HttpSession s, Command c) {
|
||||
return s != null && s.getAttribute("authorized") == c;
|
||||
}
|
||||
|
||||
public static boolean operator(HttpSession s) {
|
||||
return s != null && s.getAttribute("operator") != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user