package com.eactive.eai.authserver.config;

import lombok.Data;

@Data
public class RequestContextData { 
    private String clientId;
    private String ipAddress;
    private String grantType;
    private String scope;
    private String username;
    private String resource;

    // Getters and setters

    public static class ThreadLocalRequestContext {
        private static final ThreadLocal<RequestContextData> contextHolder = new ThreadLocal<>();

        public static void set(RequestContextData data) {
            contextHolder.set(data);
        }

        public static RequestContextData get() {
            return contextHolder.get();
        }

        public static void clear() {
            contextHolder.remove();
        }
    }
}