SHARE
TWEET

Untitled

a guest Jul 17th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [HttpGet]
  2.     [ActionName("GetUserData")]
  3.     public string GetUserData()
  4.     {
  5.         return HttpContext.User.Claims.FirstOrDefault(x=>x.Type=="Email").Value;
  6.     }
  7.      
  8. public void Configure(IApplicationBuilder app, IHostingEnvironment env)
  9.     {
  10.         if (env.IsDevelopment())
  11.         {
  12.             app.UseDeveloperExceptionPage();
  13.         }
  14.         else
  15.         {              
  16.             app.UseHsts();
  17.         }
  18.         app.UseAuthentication();
  19.         //MyMiddleware в этом не причастен, пробовал его убирать
  20.         app.UseMiddleware<MyMiddleware>();
  21.         app.UseHttpsRedirection();
  22.         app.UseMvc();
  23.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top