Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Ranch Hand
Posts: 67
1
Spring Java Linux
  • 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
Spring Java Linux
  • 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....
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic