Changeset 3b878a1 for lib/oauth.h
- Timestamp:
- 2010-05-02T21:20:09Z (15 years ago)
- Branches:
- master
- Children:
- 6824fb3
- Parents:
- 839189b (diff), f4b0911 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/oauth.h
r839189b r3b878a1 40 40 { 41 41 oauth_stage_t stage; 42 const struct oauth_service *sp; 42 43 43 44 oauth_cb func; … … 46 47 struct http_request *http; 47 48 48 char *auth_ params;49 char *auth_url; 49 50 char *request_token; 50 51 51 char *access_token; 52 char *token; 53 char *token_secret; 54 }; 55 56 struct oauth_service 57 { 58 char *url_request_token; 59 char *url_access_token; 60 char *url_authorize; 61 62 char *consumer_key; 63 char *consumer_secret; 52 64 }; 53 65 … … 56 68 authorization URL for the user. This is passed to the callback function 57 69 in a struct oauth_info. */ 58 struct oauth_info *oauth_request_token( const char *url, oauth_cb func, void *data );70 struct oauth_info *oauth_request_token( const struct oauth_service *sp, oauth_cb func, void *data ); 59 71 60 72 /* http://oauth.net/core/1.0a/#auth_step3 (section 6.3) … … 62 74 token. This is passed to the callback function in the same 63 75 struct oauth_info. */ 64 void oauth_access_token( const char *url,const char *pin, struct oauth_info *st );76 gboolean oauth_access_token( const char *pin, struct oauth_info *st ); 65 77 66 78 /* http://oauth.net/core/1.0a/#anchor12 (section 7) … … 69 81 whatever's going to be in the POST body of the request. GET args will 70 82 automatically be grabbed from url. */ 71 char *oauth_http_header( char *access_token, const char *method, const char *url, char *args );83 char *oauth_http_header( struct oauth_info *oi, const char *method, const char *url, char *args ); 72 84 73 85 /* Shouldn't normally be required unless the process is aborted by the user. */ 74 86 void oauth_info_free( struct oauth_info *info ); 87 88 /* Convert to and back from strings, for easier saving. */ 89 char *oauth_to_string( struct oauth_info *oi ); 90 struct oauth_info *oauth_from_string( char *in, const struct oauth_service *sp );
Note: See TracChangeset
for help on using the changeset viewer.