Download the PHP package webiik/oauth1client without Composer
On this page you can find all versions of the php package webiik/oauth1client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webiik/oauth1client
More information about webiik/oauth1client
Files in webiik/oauth1client
Package oauth1client
Short Description The OAuth1Client allows you to connect to any OAuth1 server.
License MIT
Homepage https://www.webiik.com
Informations about the package oauth1client
OAuth1Client
The OAuth1Client allows you to connect to any OAuth1 server. Just follow the procedure described in the example below.
Installation
Example
Configuration
Before you can connect to any OAuth1 server, you have to properly configure access credentials and endpoints.
setConsumerKey
setConsumerKey() sets consumer key.
setConsumerSecret
setConsumerSecret() sets consumer secret.
setSignatureSecret
setSignatureSecret() sets signature secret. Usually it't optional or not required.
setRequestTokenUrl
setRequestTokenUrl() sets URL to obtain a request token.
setAuthorizeUrl
setAuthorizeUrl() sets URL to authorize a request token by user at OAuth1 server.
setCallbackUrl
setCallbackUrl() sets URL to redirect a user after authorization.
setAccessTokenUrl
setAccessTokenUrl() sets URL to obtain a access token.
Login
getAuthorizeUrl
getAuthorizeUrl() makes HTTP POST request to a URL set by setAuthorizeUrl().
Authorization
getAccessToken
getAccessToken() makes HTTP POST request to URL set by setAccessTokenUrl() and returns an array with 'oauth_token' on success and a string with cURL error message on error.
API Access
get
get() makes authorized HTTP GET request to OAuth1 API endpoint.
post
post() makes authorized HTTP POST request to OAuth1 API endpoint.