OAuth helper class.
More...
OAuth helper class.
- You can extends oauth_helper to add specific functions, such as twitter extends oauth_helper
- Call request_token method to get oauth_token and oauth_token_secret, and redirect user to authorize_url, developer needs to store oauth_token and oauth_token_secret somewhere, we will use them to request access token later on
- User approved the request, and get back to moodle
- Call get_access_token, it takes previous oauth_token and oauth_token_secret as arguments, oauth_token will be used in OAuth request, oauth_token_secret will be used to bulid signature, this method will return access_token and access_secret, store these two values in database or session
- Now you can access oauth protected resources by access_token and access_secret using oauth_helper::request method (or get() post())
Note:
- This class only support HMAC-SHA1
- oauth_helper class don't store tokens and secrets, you must store them manually
- Some functions are based on http://code.google.com/p/oauth/
- Copyright
- 2010 Dongsheng Cai dongs.nosp@m.heng.nosp@m.@mood.nosp@m.le.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later