0

我明白TweetDeck可以幫助用戶代表她訪問Twitter和Facebook。TweetDeck用於桌面應用程序/移動應用程序/ Web應用程序的認證機制是什麼?

OAuth2,這意味着TweetDeck是第三方應用程序,Twitter和Facebook是資源服務器,而用戶是資源所有者。

我的問題是不是關於TweetDeck代表資源所有者訪問某個資源服務器。

我的問題是如何TweetDeck的,因爲在所有3種處理身份驗證爲自己的桌面應用程序/移動應用程序/ Web應用程序,用戶仍然需要用她自己的TweetDeck的用戶名/密碼登錄?

對於web應用程序來說,它很簡單。 TweetDeck可以使用良好的服務器會話和瀏覽器cookie來維護應用程序/身份驗證狀態以及通過HTTPS的簡單登錄表單。

我的主要問題是桌面應用程序/移動應用程序呢?

TweetDeck是否也使用OAuth2進行自己的身份驗證?如果不是,它使用什麼?

如果是這樣,是不是Resource Owner Password Credentials Grant?如果不是,那麼哪種類型的OAuth授予?

如果是這樣,他們如何避免受到暴力攻擊的危害?因爲它是在文檔中陳述的,所以這個端點需要防止暴力攻擊。

+0

用戶不是客戶端,因爲客戶端是第三方應用程序。用戶是資源所有者。 –

+0

固定。謝謝@ArtemOboturov –

回答

0

它使用HTTP Basic Authentication自定義會話實現。這不是OAuth2的資源所有者的密碼憑證授權的實現,因爲我在下面的測試運行中未指定某些required parameters(例如grant_type),並且服務器沒有投訴。

這是我沒有使用curl這樣的本地運行:

∴ curl -v https://opyate%40gmail.com:[email protected]/login\?session\=true 
    * About to connect() to api.tweetdeck.com port 443 (#0) 
    * Trying 199.59.149.231... 
    * connected 
    * Connected to api.tweetdeck.com (199.59.149.231) port 443 (#0) 
    * successfully set certificate verify locations: 
    * CAfile: /opt/local/share/curl/curl-ca-bundle.crt 
     CApath: none 
    * SSLv3, TLS handshake, Client hello (1): 
    * SSLv3, TLS handshake, Server hello (2): 
    * SSLv3, TLS handshake, CERT (11): 
    * SSLv3, TLS handshake, Server finished (14): 
    * SSLv3, TLS handshake, Client key exchange (16): 
    * SSLv3, TLS change cipher, Client hello (1): 
    * SSLv3, TLS handshake, Finished (20): 
    * SSLv3, TLS change cipher, Client hello (1): 
    * SSLv3, TLS handshake, Finished (20): 
    * SSL connection using RC4-SHA 
    * Server certificate: 
    * subject: C=US; ST=CA; L=San Francisco; O=Twitter, Inc.; OU=Twitter Security; CN=tdweb.twitter.com 
    * start date: 2012-02-23 00:00:00 GMT 
    * expire date: 2015-02-27 12:00:00 GMT 
    * subjectAltName: api.tweetdeck.com matched 
    * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Assurance CA-3 
    * SSL certificate verify ok. 
    * Server auth using Basic with user '[email protected]' 
    > GET /login?session=true HTTP/1.1 
    > Authorization: Basic 1337YfRl1337YWl1337vbTpzdXJmYTMyMA== 
    > User-Agent: curl/7.25.0 (x86_64-apple-darwin10.8.0) libcurl/7.25.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.22 
    > Host: api.tweetdeck.com 
    > Accept: */* 
    > 
    < HTTP/1.1 200 OK 
    < Transfer-Encoding: chunked 
    < Date: Tue, 12 Jun 2012 12:59:47 GMT 
    < Expires: Fri, 21 Mar 1975 09:30:00 GMT 
    < Content-Type: text/html 
    < Cache-Control: no-cache 
    < Cache-Control: no-store 
    < Cache-Control: must-revalidate 
    < Cache-Control: pre-check=0 
    < Cache-Control: post-check=0 
    < Server: tfe 
    < 
    * Connection #0 to host api.tweetdeck.com left intact 
    {"mail_list": "False", "session": "Ta1337Qb1wu1337Ra29b1337-13371337Vbf93y91337", "updated_time": "2011-12-08T12:31:00"}* Closing connection #0 
    * SSLv3, TLS alert, Client hello (1): 

BTW,我接到了一個Chrome開發者工具會話登錄網址:

enter image description here


UPDATE

I asked TweetDeck themselves,但在寫作時他們還沒有回覆。

+0

所以我正確嗎,即使對於桌面和移動應用程序,Tweetdeck也能做到這一點? –

+0

對不起,我認爲大多數人看到SPA和桌面應用程序是一樣的。我下載/安裝了Adobe AIR Tweetdeck客戶端,我通過Wireshark看到的第一件事情是對api.tweetdeck.com的SSL CONNECT調用,所以大概是的。 – opyate

+0

我試圖使用Charles,但由於SSL而看不到任何參數。它們是否包含代碼,client_id,client_secret,access_tokens之類的參數?如果他們不這樣做,那麼我猜他們不會使用OAuth登錄 –

相關問題