Changes in protocols/jabber/sasl.c [c27a923:c153808]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/sasl.c
rc27a923 rc153808 47 47 "4b100f0f244d620bf3f15f8b217d4c32", 48 48 }; 49 const struct oauth2_service oauth2_service_mslive = 50 { 51 "https://oauth.live.com/authorize", 52 "https://oauth.live.com/token", 53 "http://www.bitlbee.org/main.php/Messenger/oauth2.html", 54 "wl.offline_access%20wl.messenger", 55 "000000004C06FCD1", 56 "IRKlBPzJJAWcY-TbZjiTEJu9tn7XCFaV", 57 }; 49 58 50 59 xt_status sasl_pkt_mechanisms( struct xt_node *node, gpointer data ) … … 54 63 struct xt_node *c, *reply; 55 64 char *s; 56 int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0 ;65 int sup_plain = 0, sup_digest = 0, sup_gtalk = 0, sup_fb = 0, sup_ms = 0; 57 66 int want_oauth = FALSE; 58 67 GString *mechs; … … 89 98 else if( c->text && g_strcasecmp( c->text, "X-FACEBOOK-PLATFORM" ) == 0 ) 90 99 sup_fb = 1; 100 else if( c->text && g_strcasecmp( c->text, "X-MESSENGER-OAUTH2" ) == 0 ) 101 sup_ms = 1; 91 102 92 103 if( c->text ) … … 98 109 if( !want_oauth && !sup_plain && !sup_digest ) 99 110 { 100 if( !sup_gtalk && !sup_fb )111 if( !sup_gtalk && !sup_fb && !sup_ms ) 101 112 imcb_error( ic, "This server requires OAuth " 102 113 "(supported schemes:%s)", mechs->str ); … … 130 141 reply->text_len = strlen( reply->text ); 131 142 g_free( s ); 143 } 144 else if( sup_ms && want_oauth ) 145 { 146 xt_add_attr( reply, "mechanism", "X-MESSENGER-OAUTH2" ); 147 reply->text = g_strdup( jd->oauth2_access_token ); 148 reply->text_len = strlen( jd->oauth2_access_token ); 132 149 } 133 150 else if( sup_fb && want_oauth )
Note: See TracChangeset
for help on using the changeset viewer.