All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.daedafusion.security.bindings.LocalSubjectStorage Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
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