package com.kcim.common.token;

import org.springframework.stereotype.Component;

@Component
public class ThreadLocalToken {

    private ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public void setToken(String token) {
        threadLocal.set(token);
    }

    public String getToken() {
        return (String) threadLocal.get();
    }

    public void clear() {
        threadLocal.remove();
    }
}
