
package com.tmerclub.cloud.common.security;

import com.alibaba.ttl.TransmittableThreadLocal;

/**
 * @author xxw
 * @version 1.0
 * @description:
 * @since 2024/1/4 11:23
 */
public class AuthTokenContext {
    private static final ThreadLocal<String>TOKEN_LOCAL = new TransmittableThreadLocal<>();

    public static String getToken() {
        return TOKEN_LOCAL.get();
    }

    public static void setToken(String request) {
        TOKEN_LOCAL.set(request);
    }

    public static void cleanToken() {
        TOKEN_LOCAL.remove();
    }
}
