aboutsummaryrefslogtreecommitdiffstats
path: root/lib/oauth2.h
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2011-12-18 20:25:44 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2011-12-18 20:25:44 +0100
commit18c6d369d777a1d38ef450f868c22de1d0ebba2d (patch)
treed9553b908b2129ab4dd483b2c584be8c27fc15ed /lib/oauth2.h
parent6e9ae727bcd95eb820fa28becaf9f79ac463de5f (diff)
More generic OAuth support now. Should work well for all GTalk accounts now
and somewhat for MS Messenger. The fb part needs different parsing of the authorize request, and possibly some other work.
Diffstat (limited to 'lib/oauth2.h')
-rw-r--r--lib/oauth2.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/oauth2.h b/lib/oauth2.h
index 6f56b426..c8d18963 100644
--- a/lib/oauth2.h
+++ b/lib/oauth2.h
@@ -31,22 +31,17 @@ struct oauth2_service
char *auth_url;
char *token_url;
char *redirect_url;
+ char *scope;
char *consumer_key;
char *consumer_secret;
};
-/* Currently suitable for authenticating to Google Talk only, and only for
- accounts that have 2-factor authorization enabled. */
-extern struct oauth2_service oauth2_service_google;
-
-extern struct oauth2_service oauth2_service_facebook;
-
#define OAUTH2_AUTH_CODE "authorization_code"
#define OAUTH2_AUTH_REFRESH "refresh_token"
/* Generate a URL the user should open in his/her browser to get an
authorization code. */
-char *oauth2_url( const struct oauth2_service *sp, const char *scope );
+char *oauth2_url( const struct oauth2_service *sp );
/* Exchanges an auth code or refresh token for an access token.
auth_type is one of the two OAUTH2_AUTH_.. constants above. */