
com.daedafusion.security.bindings.LocalSubjectStorage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of security-framework Show documentation
Show all versions of security-framework Show documentation
A pluggable security framework "inspired" by the OWASP ESAPI framework
package com.daedafusion.security.bindings;
import com.daedafusion.security.authentication.Subject;
import org.apache.log4j.Logger;
/**
* Created by mphilpot on 7/11/14.
*/
public class LocalSubjectStorage
{
private static final Logger log = Logger.getLogger(LocalSubjectStorage.class);
public static final ThreadLocal subjectThreadLocal = new ThreadLocal<>();
private LocalSubjectStorage(){}
public static void set(Subject subject)
{
subjectThreadLocal.set(subject);
}
public static void unset()
{
subjectThreadLocal.remove();
}
public static Subject get()
{
return subjectThreadLocal.get();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy