KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > atlassian > seraph > auth > AuthenticationContextImpl


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