This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Using a custom form for Spring Security Waffle authentication instead of the browser popup  RSS feed

 
Zahro Alfelpha
Ranch Hand
Posts: 67
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a Spring MVC application that authenticates using Waffle. I have successfully configured it and it works just fine, but I would like to use a custom form instead of the browser popup when the browser does not automatically send their network credentials.

I have modified my configuration to use `formLogin()` hoping that it would use my existing authentication, but no luck.



This would be the ideal behavior:


 
Zahro Alfelpha
Ranch Hand
Posts: 67
1
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Major Progress! I have successfully got the form to authenticate using Windows network credentials. Here's how I did it:

First of all, let me show you the bean declarations I left out of my original post. They are located in a separate class.


Now, this is how I got the generated spring security form to authenticate with Windows network credentials

First, I added this bean of type `waffle.spring.WindowsAuthenticationProvider`


Then I added it to `SecurityConfig.java` and used it to set the authentication provider in the http security chain


Now I just have to figure out how to only use the form if the browser doesn't send the credentials! Hmmmm....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!