package com.css.simulation.resource.scene.common.oauth;

import org.springframework.core.NamedInheritableThreadLocal;

public class AuthorizationHolder {

    private static final ThreadLocal<String> inheritableRequestAttributesHolder = new NamedInheritableThreadLocal<>("Authorization");

    public static void setAuthorization(String authorization){
        inheritableRequestAttributesHolder.set(authorization);
    }

    public static String getAuthorization(){
        return inheritableRequestAttributesHolder.get();
    }

    public static void remove(){
        inheritableRequestAttributesHolder.remove();
    }

}
