- Timestamp:
- 2010-04-26T22:40:11Z (15 years ago)
- Branches:
- master
- Children:
- 78a2f1e
- Parents:
- 713d611
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/oauth.c
r713d611 rc42e8b9 302 302 } 303 303 304 st->stage = OAUTH_REQUEST_TOKEN; 304 305 st->func( st ); 305 306 } … … 322 323 323 324 if( req->status_code == 200 ) 324 st->access_token = g_strdup( req->reply_body ); 325 325 { 326 GSList *params; 327 const char *token, *token_secret; 328 329 oauth_params_parse( ¶ms, req->reply_body ); 330 token = oauth_params_get( ¶ms, "oauth_token" ); 331 token_secret = oauth_params_get( ¶ms, "oauth_token_secret" ); 332 st->access_token = g_strdup_printf( 333 "oauth_token=%s&oauth_token_secret=%s", token, token_secret ); 334 oauth_params_free( ¶ms ); 335 } 336 337 st->stage = OAUTH_ACCESS_TOKEN; 326 338 st->func( st ); 327 339 } -
lib/oauth.h
r713d611 rc42e8b9 27 27 typedef void (*oauth_cb)( struct oauth_info * ); 28 28 29 typedef enum 30 { 31 OAUTH_INIT, 32 OAUTH_REQUEST_TOKEN, 33 OAUTH_ACCESS_TOKEN, 34 } oauth_stage_t; 35 29 36 struct oauth_info 30 37 { 38 oauth_stage_t stage; 39 31 40 oauth_cb func; 32 41 void *data;
Note: See TracChangeset
for help on using the changeset viewer.