aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/jabber.h
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-08-30 17:40:19 -0300
committerdequis <dx@dxzone.com.ar>2016-08-30 17:40:19 -0300
commit67ea361f9f8b2a197e8e52055e4d779a36a876f5 (patch)
tree91ac2400191960fecc133aa7653ff7eb9da33d18 /protocols/jabber/jabber.h
parent2dc394c7b0d7dfec1e0a7f553d3510c5efa98086 (diff)
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.
Diffstat (limited to 'protocols/jabber/jabber.h')
-rw-r--r--protocols/jabber/jabber.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h
index d76ee08f..db43f205 100644
--- a/protocols/jabber/jabber.h
+++ b/protocols/jabber/jabber.h
@@ -339,6 +339,7 @@ gboolean sasl_supported(struct im_connection *ic);
void sasl_oauth2_init(struct im_connection *ic);
int sasl_oauth2_get_refresh_token(struct im_connection *ic, const char *msg);
int sasl_oauth2_refresh(struct im_connection *ic, const char *refresh_token);
+void sasl_oauth2_got_token(gpointer data, const char *access_token, const char *refresh_token, const char *error);
extern const struct oauth2_service oauth2_service_google;