Changeset 64b6635 for protocols/jabber/jabber.c
- Timestamp:
- 2011-12-18T21:56:44Z (12 years ago)
- Branches:
- master
- Children:
- 9b0ad7e
- Parents:
- 18c6d36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/jabber.c
r18c6d36 r64b6635 152 152 jd->oauth2_service = &oauth2_service_google; 153 153 154 /* For the first login with OAuth, we have to authenticate via the browser. 155 For subsequent logins, exchange the refresh token for a valid access 156 token (even though the last one maybe didn't expire yet). */ 157 if( strncmp( acc->pass, "refresh_token=", 14 ) != 0 ) 154 /* First see if we have a refresh token, in which case any 155 access token we *might* have has probably expired already 156 anyway. */ 157 if( strstr( acc->pass, "refresh_token=" ) ) 158 { 159 sasl_oauth2_refresh( ic, acc->pass + 14 ); 160 } 161 /* If we don't have a refresh token, let's hope the access 162 token is still usable. */ 163 else if( strstr( acc->pass, "access_token=" ) ) 164 { 165 sasl_oauth2_load_access_token( ic ); 166 jabber_connect( ic ); 167 } 168 /* If we don't have any, start the OAuth process now. Don't 169 even open an XMPP connection yet. */ 170 else 158 171 { 159 172 sasl_oauth2_init( ic ); 160 173 ic->flags |= OPT_SLOW_LOGIN; 161 174 } 162 else163 sasl_oauth2_refresh( ic, acc->pass + 14 );164 175 } 165 176 else
Note: See TracChangeset
for help on using the changeset viewer.