开发者

Authenticating to Spring Security after authenticating to Twitter / Facebook

I have a grails app configured with spring-security-core and I need to allow Facebook / Twitter logins. I'm using the facebook plugin for grails and I'm using twitter4j for twitter authentication. Currentl开发者_运维技巧y, I am successfully authenticating against Twitter and Facebook.

I'm wondering how I am to integrate those logins with Spring security. If a user logs in with Twitter I am assuming I need to create an account in my database and then use that account to process a login for Spring Security so that it wires up the session appropriately and all the authentication checks happen based on my @Secured annotations and tag usage in my views.

Something similar, I am guessing, needs to happen based on Facebook logins. Can someone point me in the right direction to get this implemented correctly?


A really good resource for understanding how to integrate an external authentication source is this article by Luke Taylor:

http://blog.springsource.com/2010/08/02/spring-security-in-google-app-engine/

Grant

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜