Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am facing below error. can you help?

waffle.spring.NegotiateSecurityFilter    : error logging in user: com.sun.jna.platform.win32.Win32Exception: The token supplied to the function is invalid
 
No more fooling around. Read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic