Use OWIN Ws-Federation package to authenticate against ADFS 3.0

后端 未结 3 1528
梦如初夏
梦如初夏 2021-02-02 16:03

I have an MVC intranet site that needs to use AD accounts for authentication.

I setup ADFS 3.0 (Win Server 2012 R2) and followed this to setup the ADFS Relying Party Tr

3条回答
  •  一个人的身影
    2021-02-02 16:12

    Yeah.. I came across the same issue. Just do the following and it should work:

        app.SetDefaultSignInAsAuthenticationType(WsFederationAuthenticationDefaults.AuthenticationType );
    
        app.UseCookieAuthentication(new CookieAuthenticationOptions
        {
           AuthenticationType = WsFederationAuthenticationDefaults.AuthenticationType
        });
    

提交回复
热议问题