|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public IEnumerable<Claim> GetClaimsIdentity() | 
|---|
|  |  |  | { | 
|---|
|  |  |  | var claims = _accessor.HttpContext.User.Claims.ToList(); | 
|---|
|  |  |  | var headers = _accessor.HttpContext.Request.Headers; | 
|---|
|  |  |  | foreach (var header in headers) | 
|---|
|  |  |  | if (_accessor.HttpContext != null) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | claims.Add(new Claim(header.Key, header.Value)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return claims; | 
|---|
|  |  |  | var claims = _accessor.HttpContext.User.Claims.ToList(); | 
|---|
|  |  |  | var headers = _accessor.HttpContext.Request.Headers; | 
|---|
|  |  |  | foreach (var header in headers) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | claims.Add(new Claim(header.Key, header.Value)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return claims; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ArraySegment<Claim>.Empty; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public List<string> GetClaimValueByType(string ClaimType) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public string UserName { get; set; } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public int UserId {  get; set; } | 
|---|
|  |  |  | public int UserId { get; set; } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public string UserTrueName { get; set; } | 
|---|
|  |  |  |  | 
|---|