Mercurial > public > sg101
comparison gpp/gcalendar/oauth.py @ 458:9a4bffdf37c3
Finishing up #220. Updated to GData v2.0 and using the new OAuth access token.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 02 Jul 2011 03:52:43 +0000 |
parents | e44dd53885dc |
children |
comparison
equal
deleted
inserted
replaced
457:7b7332037396 | 458:9a4bffdf37c3 |
---|---|
78 client = CalendarResourceClient(None, source=USER_AGENT) | 78 client = CalendarResourceClient(None, source=USER_AGENT) |
79 access_token = client.GetAccessToken(request_token) | 79 access_token = client.GetAccessToken(request_token) |
80 | 80 |
81 logger.info("upgraded to access token...") | 81 logger.info("upgraded to access token...") |
82 return access_token | 82 return access_token |
83 | |
84 | |
85 def serialize_token(token): | |
86 """ | |
87 This function turns a token into a string and returns it. | |
88 | |
89 """ | |
90 return gdata.gauth.TokenToBlob(token) | |
91 | |
92 | |
93 def deserialize_token(s): | |
94 """ | |
95 This function turns a string into a token returns it. The string must have | |
96 previously been created with serialize_token(). | |
97 | |
98 """ | |
99 return gdata.gauth.TokenFromBlob(s) |