package org.gcube.common.authorization.library.provider; import org.gcube.common.authorization.library.utils.Caller; @Deprecated public class AuthorizationProvider { public static AuthorizationProvider instance = new AuthorizationProvider(); // Thread local variable containing each thread's ID private static final InheritableThreadLocal threadAuth = new InheritableThreadLocal() { @Override protected Caller initialValue() { return null; } }; private AuthorizationProvider(){} public Caller get(){ Caller info = threadAuth.get(); return info; } public void set(Caller info){ threadAuth.set(info); } public void reset(){ threadAuth.remove(); } }