package org.springblade.common.auth.permission;

/**
 * @author caiyihua
 */
public class SessionIdContextUtil {

    private static ThreadLocal<String> context = new ThreadLocal<String>() {
        @Override
        protected String initialValue() {
            return "";
        }
    };

    public static void setCurrentSessionId(String sessionId) {
        context.set(sessionId);
    }

    public static String getCurrentSessionId() {
        return context.get();
    }
    
    public static void clearCurrentSessionId() {
        context.set("");
    }

}
