Dış uygulama OpenSocial kimlik doğrulama

2 Cevap php

Kullanıcıların sistemi ile bir kez kayıt sağlayan, power.com, nerede tek bir web sitesi altında birkaç farklı sosyal ağ siteleri birleştirmeye çalışıyorum anapara bütün bu farklı olmayan bir web projesi üzerinde çalışıyorum , sistem işlemek için inşa edilmiştir ve daha sonra bunları tek bir yerde kendi profil bilgilerini görüntüleyebilmek için izin, kendi sosyal ağ hesapları (Facebook, MySpace, Orkut, vb) gibi birçok eklemek.

Simply put, I can't seem to find a way to authenticate arbitrary users into their social network accounts.

Ben OpenSocial özellikler yanı sıra, OpenSocial PHP client projesi poring oldum, ama her şey dairesel bağımlı olduğu görünen gibi ben, bir şey eksik gibi görünüyor.

Benim ilk sorun, test amaçlı, ben bir MySpace tüketici anahtarını ve tüketici sırrı var, ama ben MySpace ile 3 bacaklı kimlik doğrulaması yapmak için çalıştılar, someone else olarak giriş için bir seçenek yoktur, olmasıdır. Artı, (bu nihai sosyal ağ "portal" bir kullanıcı olarak, doğrusu bu yönlendirme sürecinde yeni bir hesap eklemek her zaman gitmek olurdu değil) biraz istenmeyen bir harici yönlendirme gerçekleştirir.

Nasıl programlı bir keyfi kullanıcının kimliğini doğrulamak ve onlara hesap bilgileri (tercihen harici yönlendirme olmadan) erişime izin verecek?

İkincisi, 2 bacaklı kimlik bilgileri almak için keyfi kullanıcıyı tanımlayan bir userId (genellikle keyfi bir tamsayı) gerektirir. Ben MySpace OpenSocial kimliğinizi girin Ancak, birlikte tüketici anahtarı ve tüketici gizli verilen, ben bir 401 Erişim engellendi hatası verilen am. Ayrıca, gelecekte bu kimliği kullanmak için, ben ilk kullanıcının kimliğini doğrulamak gerekir gibi görünüyor ... ama bu kimlik numarası gerektiren görünür.

Ben önemsiz bir şey eksik oldukça eminim, ama beni yaşam için ne olduğunu çözemiyorum. Yardım büyük takdir!

2 Cevap

Teknik olarak bu benim cevap değil, ama OpenSocial de geliştiriciler sorumun (vurgu benim) ile ilgili aşağıdaki bilgileri bana vermiş:

3-legged OAuth is built around the redirect back to the site you're authenticating with, and there's no way to avoid it. It's not the most convenient experience, but allows users to share their data with your website while keeping their passwords private. Any design which requires users to enter their MySpace password into a form on your website is considered an anti-pattern and should be avoided. You could potentially attempt the redirect in a popup window in order to make the experience a bit less jarring for the user (currently the PHP client doesn't make this that easy, but if you followed up at opensocial-client-libraries@googlegroups.com someone could help you work through that process).

With regard to not being able to change the user, what I believe MySpace is doing in your case is checking for a MySpace cookie and pre-populating your account information. If you were a user visiting the site and not logged into MySpace, you should get a full username/login box combination. There should also be a button or link somewhere to say "I'm not this user" and log in with other credentials.

As for 2-legged, you would need to have the application associated with the consumer key/secret installed on the profile of any user whose data you wish to access. 2-legged is mostly intended for developers who are currently running a social gadget on a container and wish to access social data for their application users out of band with a gadget render. In this case, the application server would already have the user's OpenSocial ID (from a signed makeRequest) and the user would already have the app installed on their MySpace profile).

Most of this is covered in http://wiki.opensocial.org/index.php?title=OAuth_Use_Casesif you want more information.

Esasen, bu bir dış uygulamaya 2 bacaklı kimlik herhangi bir şekilde kullanılması imkansız hale getirir; 2-ayaklı açık durum bu tür kullanılmak üzere tasarlanmıştır edilmiştir. Ayrıca, o biraz açıklar böylece power.com gerçekten, kullanıcıların gerçek Orkut / MySpace / etc kimlik kaynağı olan anti-desen istihdam gibi görünüyor.

Benim çerezleri temizleyerek MySpace üzerinden beni doğrulamak için çalıştı. Bu 3 bacaklı auth desteklemek için görünmüyor Ancak, ben, Orkut kimlik çalışmak nasıl hakkında başka bir soru ile izledi. İşte aldığım yanıt oldu:

Orkut is interested in supporting this, so you'll be able to allow users to share their information with your application "correctly" in the future.

The corresponding two-legged app would need to forward the current viewer's OpenSocial ID back to your server, probably along with an authorization token you generate yourself so that you can link a user's session on orkut with a session on your own server. Honestly, it's probably not usable enough to support a standalone login system.

Esasen, hayır, Orkut gerçekten anti-desen başvurmadan (en azından henüz) harici bir uygulama içine bağladım olamaz.

Herkes bu konu hakkında başka bir bilgi varsa, paylaşmak için çekinmeyin!

Desen de burada bahsedilen http://sites.google.com/site/oauthgoog/2leggedoauth/2opensocialrestapi

Esasen mashups bir sürü bu özelliği isterim:

A 3rd party site which DOES NOT have a gadget wants to get the end-users permission to access their data at the social network, for example to download their friend list, or to get permission to post to their activity stream