package com.microservices.common.security.service.impl;

import com.microservices.common.core.constant.SecurityConstants;
import com.microservices.common.core.utils.ServletUtils;
import com.microservices.common.security.service.IRequestCustomService;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @author otto
 */
@Service
public class RequestCustomServiceImpl implements IRequestCustomService {

    @Override
    public String processRequestDeptId(HttpServletRequest request) {
        return ServletUtils.getHeader(request, SecurityConstants.DEPT_ID);
    }
}
