# iauth_python_client **Repository Path**: songjinghe/iauth_python_client ## Basic Information - **Project Name**: iauth_python_client - **Description**: 北航iAuth2.0系统python客户端,包含WSC(Web Site Client)和UAC(User Agent Client)的实现,我用它来从ihome收消息。。。 - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2013-09-08 - **Last Updated**: 2021-03-09 ## Categories & Tags **Categories**: networklib **Tags**: None ## README iAuth python client ============================ 北航iAuth2.0系统python客户端,包含WSC(Web Site Client)和UAC(User Agent Client)的实现,我用它来从ihome收消息。。。 **iauth is a protocal which allows third part APPs to acess user data on a Resource Provider** iAuth is corrently used in [BUAA ihome](http://i.buaa.edu.cn "i北航"). Corrently there is only one script in this project. You can extend or reuse it in your code---- it's under GPLv2 or later. Thought the main purpose is teaching you how to implent a minimum but fully functional UAC, but you can still use this script to recieve messages in IHOME. Here is a [hand by hand toturial](http://git.oschina.net/songjinghe/iauth_python_client/wikis/手把手教你用iAuth的python客户端查看ihome新通知(新消息) "手把手教你用iAuth的python客户端查看ihome新通知(新消息)") to help you use this script.... There are 2 kinds of iauth app client: **UAC(User Agent Client)** and WSC(Web Site Client). And this python project mainly aimed at acting as an UAC. Also UAC is the easiest client type to be developed. #### PPS:我在代码里放了一些调试用的输出,你可以把它去掉。。。 # How to use ### STEP 1 Get Verifier get verifier code from http://i.buaa.edu.cn/plugin.php?pluginid=apps&ac=detail&appsid=50 or http://i.buaa.edu.cn/plugin.php?pluginid=apps&ac=detail&appsid=52 OK, here you get a verifier. Say, dRV6jM90jAkYg766 for example. ### STEP 2 Get Access token and secret in the terminal, type: ```shell ==>python iauth.py auth dRV6jM90jAkYg766 ``` if everything is OK, you should get something like this: ```shell ==>python iauth.py auth dRV6jM90jAkYg766 uid=8888&access_token=b44df1c0249f8b2c5d1d1340071193f94531cae8&access_secret=88699276c01fca1234146fb557f7bea3 ==> ``` ### STEP 3 Call API with Access token and secret ```shell ==>python iauth.py b44df1c0249f8b2c5d1d1340071193f94531cae8 88699276c01fca1234146fb557f7bea3 ``` OK, now we got the data from http://i.buaa.edu.cn/plugin/iauthClient/api/do_getallthings.php (by default) # Notes For more detailed information about iAuth, please read this blog on ihome. If you are interested in building a productive APP, read this blog.