예제 #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;
 }