简体   繁体   中英

Authentication combination OpenID & Facebook

Is it possible to use a combination of authentication systems in a web app?

I want to use OpenId, however I think my potential customers are actually more likely to have a Facebook ID.

Therefore I wonder if it is possible to offer both types of authentication?

Facebook已加入OpenID基金会 ,所以他们很快就会实施OpenID(在这种情况下,使用OpenID可能会更好)。

For nearly every language there should be a Framework! You can chain/wrap the functionality of that frameworks to statisfy your needs!

In pseudocode:

if(IsUserValidViaOpenId() || IsUserValidByOwnAuthDB()) ...  user auth successful

If you use java, Acegi/Spring Security might be the best way (Security which isn't inversive - via AOP). There you can use openID and define an own second validator for yor own userdb!

You want RPX . It abstracts the whole mess of OpenID away from both you and your visitors. It also lets them authenticate with Facebook or MySpace in addition to the OpenID providers.

It provides a login interface very similar to what you see right here on Stack Overflow.

Something like this in your form processing logic:

def authenticate(form_info):
    url = form_info['url']
    if (is_facebook_url(url)):
        return perform_facebook_authentication(form_info)
    else:
        return perform_open_id_authentication(form_info)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM