View Javadoc

1   package com.atlassian.seraph.auth;
2   
3   import java.security.Principal;
4   
5   public class AuthenticationContextImpl implements AuthenticationContext
6   {
7       private static ThreadLocal threadLocal = new ThreadLocal();
8   
9       public Principal getUser()
10      {
11          return (Principal) threadLocal.get();
12      }
13  
14      public void setUser(Principal user)
15      {
16          threadLocal.set(user);
17      }
18  
19      public void clearUser()
20      {
21          setUser(null);
22      }
23  }