Пример #1
0
 boolean isChanged(Authentication auth) {
   int key = auth.hashCode();
   Integer state = authState.get(key);
   if (state != null) {
     return state == 1;
   }
   return false;
 }
Пример #2
0
 synchronized void changed() {
   if (authCacheKeys != null) {
     for (AuthCacheKey authCacheKey : authCacheKeys) {
       Authentication removed = nonUiAuthCache.remove(authCacheKey);
       if (removed != null) {
         Integer key = removed.hashCode();
         log.debug("Removed {}:{} from the non-ui authentication cache", removed.getName(), key);
         authState.put(key, 1);
       }
     }
     authCacheKeys.clear();
   }
   Set<Integer> keys = new HashSet<>(authState.keySet());
   for (Integer key : keys) {
     authState.put(key, 1);
   }
 }
Пример #3
0
 void loggedIn(Authentication auth) {
   authState.put(auth.hashCode(), 0);
 }
Пример #4
0
 void loggedOut(Authentication auth) {
   authState.put(auth.hashCode(), 2);
 }
Пример #5
0
 AuthenticationCache(Authentication first) {
   authState.put(first.hashCode(), 0);
 }