Exemplo n.º 1
0
        /// <summary>
        /// Gets the claims.
        /// </summary>
        /// <returns></returns>
        public async Task <RequestInformationOutputDto> GetClaims()
        {
            //put all data that is almost never changing in claims
            var userId   = Convert.ToInt64(_httpContextAccessor.HttpContext.User.FindFirst("UserId")?.Value);
            var username = _httpContextAccessor.HttpContext.User.FindFirst("Username")?.Value;
            var result   = new RequestInformationOutputDto
            {
                UserId = userId
            };

            return(await Task.FromResult(result));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the current.
 /// </summary>
 /// <param name="requestInfo">The request information.</param>
 public void SetCurrent(RequestInformationOutputDto requestInfo)
 {
     CurrentRequestInfoPrivate = requestInfo;
 }