Add support for X-OAuth2 authentication in Jabber protocol

Review Request #129239 - Created Oct. 21, 2016 and submitted

Pali Rohár
Add support for X-OAuth2 authentication in Jabber protocol

Based on Psi demo code from:

REVIEW: 129239
BUG: 354473
FIXED-IN: 16.12
Tested with Google's XMPP server and authentication is working.

Google's configuration is quite complicated, so here are test steps:
1) Register project on and choose it
2) In "API Manager" choose "Credentials"
3) Setup "OAuth consent screen"
4) Go to "Create credentials" and select "OAuth client ID" and choose "Other" Application type
5) This will generate public "Client ID" and private "Client Secret Key" (keep it secret, no disclose!)
6) Clone project which has "" script
7) Run: python python/ --generate_oauth2_token --client_id="Client ID" --client_secret="Client Secret Key" --scope=
8) Open URL webpage generated by script, copy verification code from webpage and type it into script
9) After that script will provide private "Refresh Token" (keep it secret, no disclose!)
10) Go to Kopete Jabber Account Settings into Connection tab, check "Use X-OAuth2 authentication" and open "Manage X-OAuth2 tokens"
11) Type "Client ID", "Client Secret Key", "Refresh Token" and as "Request URL" use: ""

From "Client ID", "Client Secret Key", "Refresh Token" via "Request URL" is retrived "Access Token" which is then used for real authentication. You can use "Access Token" for autentication too (instead previous four settings), but Google generates "Access Token" with one hour validity.
Pali Rohár
Pali Rohár
Pali Rohár
Review request changed

Status: Closed (submitted)

Change Summary: