Как получить претензии WSFederation cook ie auth? - PullRequest
1 голос
/ 27 февраля 2020

Любой не прошедший проверку подлинности пользователь моего веб-API должен подключиться к ADFS. Аутентификация проходит. Теперь, как мне получить претензию ID пользователя от повара ie?

public IServiceProvider ConfigureServices(IServiceCollection services)
{
     services.AddMvc();

     services.AddAuthentication(o =>
     {
          o.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
          o.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
          o.DefaultChallengeScheme = WsFederationDefaults.AuthenticationScheme;
     }).AddWsFederation(o =>
     {
          o.Wtrealm = Configuration["Federation:Wtrealm"];
          o.MetadataAddress = Configuration["Federation:MetadataAddress"];
     }).AddCookie();
     return ContainerConfiguration.CreateAutofacServiceProvider(services);
}
...