它使用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開發者工具會話登錄網址:
UPDATE
I asked TweetDeck themselves,但在寫作時他們還沒有回覆。
用戶不是客戶端,因爲客戶端是第三方應用程序。用戶是資源所有者。 –
固定。謝謝@ArtemOboturov –