Ignore:
Timestamp:
2016-08-30T20:40:19Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
15c4cd4, a33ee0f
Parents:
2dc394c
Message:

hipchat: Add basic support for personal oauth tokens

Fixes trac ticket 1265 - see the comments on that ticket for reasons on
why personal tokens and not the usual oauth flow. TL;DR hipchat doesn't
allow third party apps to own oauth client secrets. Instead, those are
generated when the "addon" is "installed" which requires a flow that is
either impossible or too awkward to use in bitlbee.

So, after giving up on the right way and telling the users to manage
tokens the ugly way, what's left to do is easy, just a few tweaks in the
sasl blob and short-circuit most of the actual oauth stuff. I didn't
even bother changing the service struct from google. It's not used.

This also updates the gtalk SASL X-OAUTH2 code to use GStrings instead of
juggling with malloc/strlen/strcpy, and simplifies a bit the way
GStrings are used in the equivalent SASL PLAIN code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.h

    r2dc394c r67ea361  
    340340int sasl_oauth2_get_refresh_token(struct im_connection *ic, const char *msg);
    341341int sasl_oauth2_refresh(struct im_connection *ic, const char *refresh_token);
     342void sasl_oauth2_got_token(gpointer data, const char *access_token, const char *refresh_token, const char *error);
    342343
    343344extern const struct oauth2_service oauth2_service_google;
Note: See TracChangeset for help on using the changeset viewer.