Is it possible to sign in to ADFS federation with WIF client passing user name and password from client?

1k views Asked by At

I have installed and running ADFS. User can sign in there from the WIF web app (needs to enter domain login/password at ADFS login page or enter in browser windows login popup if i use Integrated auth mode at ADFS config). Is it possible to configure ADFS/WIF the way that user enters login credentials in client application? i.e. without redirection to ADFS login page? If yes, please redirect me to a sample. Thanks!

1

There are 1 answers

3
leastprivilege On BEST ANSWER

That's possible - you basically need to request a token programmatically from the WS-Trust endpoint at ADFS - this is a pretty old blog post of mine - pre .NET 4.5 - it shows how it works in principal. Some details might have changed though:

http://leastprivilege.com/2010/04/14/using-an-active-endpoint-to-sign-into-a-web-application/

The WSTrust bindings have been removed from .NET - but you can find them in this nuget package now:

https://www.nuget.org/packages/Thinktecture.IdentityModel.WCF/

The package also includes a WSTrustClient class which can simplify the code from the blog post. Give it a go.