Пример #1
0
 public boolean isValidToken(final String authToken) {
   if (StringUtils.hasText(authToken)) {
     return this.validateToken(authToken);
   } else if (StringUtils.hasText(_token)) {
     return this.validateToken(_token);
   }
   return false;
 }
Пример #2
0
 public static String getHome() {
   if (null == __home) {
     __home = System.getProperty(IConstants.SYSPROP_HOME);
     if (!StringUtils.hasText(__home)) {
       __home = ".";
     }
   }
   return __home;
 }
Пример #3
0
 private boolean validateToken(final String token) {
   if (StringUtils.hasText(token)) {
     final String smartlyToken = getAppToken();
     if (token.equalsIgnoreCase(smartlyToken)) {
       return true;
     } else {
       final String enc1 = decodeWhile(token);
       final String enc2 = decodeWhile(smartlyToken);
       return enc1.equalsIgnoreCase(enc2);
     }
   }
   return false;
 }