ibaralf
ibaralf

Reputation: 12528

Two grails app both using springSecurity, login once to access both

I have an old grails application (ex. one-app) that has springSecurity for logins. I created a new grails app (two-app) that uses multiple databases (the DB from one-app and a new one). I am deploying both using tomcat

ip.addr.10.10/one-app
ip.addr.10.10/two-app

My question is: I want to have access to both applications by logging in only once. Basically if the user logs in on either application, he would also have access to the other application without logging in again.

Is this possible? Thanks.

Upvotes: 1

Views: 533

Answers (4)

allthenutsandbolts
allthenutsandbolts

Reputation: 1523

One other approach would be drop Cookies which can be read by both the applications.

Upvotes: 0

cdeszaq
cdeszaq

Reputation: 31300

A 3rd option would be to use the same OpenID provider for both applications.

Upvotes: 1

Igor Artamonov
Igor Artamonov

Reputation: 35951

You can configure RememberMe with exactly same configuration for both apps. After user login into any of application, Spring Security will setup special cookie, that can be reused from other app (mean athorized in another app as well).

See docs for Remember Me - http://grails-plugins.github.com/grails-spring-security-core/docs/manual/guide/9%20Authentication.html#9.3%20Remember-Me%20Cookie

Upvotes: 3

Aram Aslanyan
Aram Aslanyan

Reputation: 116

Yes, it is possible. You need to use SSO. Currently I use JOSSO for my grails applications (http://www.josso.org) combined with Spring Security.

Upvotes: 5

Related Questions