-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129239/
-----------------------------------------------------------

(Updated nov. 3, 2016, 9:09 popoludní)


Status
------

This change has been marked as submitted.


Review request for Kopete.


Bugs: 354473
    http://bugs.kde.org/show_bug.cgi?id=354473


Repository: kopete


Description
-------

Add support for X-OAuth2 authentication in Jabber protocol

Based on Psi demo code from:
https://github.com/psi-im/iris/issues/35
https://github.com/psi-plus/main/blob/master/patches/dev/xoauth2-support-demo.diff

REVIEW: 129239
BUG: 354473
FIXED-IN: 16.12


Diffs
-----

  CMakeLists.txt a2bc3840904c49c1fd854c1675d66474736d58b1 
  protocols/CMakeLists.txt d631c239a0a02fb23f2ffb3a39b6a0a2fda8022e 
  protocols/jabber/CMakeLists.txt 41f2b5db906757f492cdc6f1460372b59e12f437 
  protocols/jabber/jabberaccount.cpp a72afea1cb22502d73c4a3317c3af4aafb8e7937 
  protocols/jabber/jabberclient.h 2737e05519fd5eddbd859d130ad14a2cab8b3bcc 
  protocols/jabber/jabberclient.cpp 1a3b0e3e318c1801a24825a51f8d2bb8fa01313f 
  protocols/jabber/ui/dlgjabbereditaccountwidget.ui 
3d73a5a52df3a79ee9d542b77587aea434f5bcc8 
  protocols/jabber/ui/dlgjabberxoauth2.h PRE-CREATION 
  protocols/jabber/ui/dlgjabberxoauth2.cpp PRE-CREATION 
  protocols/jabber/ui/dlgxoauth2.ui PRE-CREATION 
  protocols/jabber/ui/jabbereditaccountwidget.h 
07f7e7056ca919cd51f9d8612d236740ff96efc8 
  protocols/jabber/ui/jabbereditaccountwidget.cpp 
51b9e445dd3d8beaee936dc6ef7290e27593dc5b 
  protocols/jabber/xoauth2provider.h PRE-CREATION 
  protocols/jabber/xoauth2provider.cpp PRE-CREATION 

Diff: https://git.reviewboard.kde.org/r/129239/diff/


Testing
-------

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 https://console.developers.google.com/project 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 https://github.com/google/gmail-oauth2-tools which has 
"oauth2.py" script
7) Run: python python/oauth2.py --generate_oauth2_token --client_id="Client ID" 
--client_secret="Client Secret Key" 
--scope=https://www.googleapis.com/auth/googletalk
8) Open URL webpage generated by script, copy verification code from webpage 
and type it into oauth2.py script
9) After that oauth2.py 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: "https://accounts.google.com/o/oauth2/token";

>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.


Thanks,

Pali Rohár

Reply via email to