using User.Insight.Tracker.Common.Model;

namespace User.Insight.Tracker.Services
{
    public class JwtHeaderService : IJwtHeaderService
    {
        public JwtRequestHeaders GetHeaders(HttpContext context)
        {
            // This is the only place that accesses raw headers
            return new JwtRequestHeaders
            {
                Authorization = context.Request.Headers["Authorization"].ToString(),
                RoleId = context.Request.Headers["RoleId"].ToString(),
                XLastActivity = context.Request.Headers["X-Last-Activity"].ToString()
            };
        }
    }
}
