1

I have a web portal built with spring security 3.X. My web portal has links of external web applications also built with spring. Id like to know if there are any working examples or code snippets on how i can automatically POST users login credentials from my portal to my external web applications in order to simulate SSO

roridedi
  • 11
  • 1
  • 2

2 Answers2

3

I assume you are not looking for an SSO solution for which you could use http://projects.spring.io/spring-security-saml/ with OpenAM/OpenSSO.

In your case you could use the AbstractPreAuthenticatedProcessingFilter, here the documentation: http://docs.spring.io/spring-security/site/docs/3.2.5.RELEASE/reference/htmlsingle/#preauth

Here a practical example I found: PreAuthentication with Spring Security -> Based on URL parameters

Community
  • 1
  • 1
selvinsource
  • 1,837
  • 2
  • 17
  • 20
0

Answering my own question.....

Solution was to create a table in the db containing username,password,and application name.. On a click event of a link the controller checks if the user has a record in the table with the corresponding application name, if so the user credentials is pasted into the form and submitted automatically.

roridedi
  • 11
  • 1
  • 2