Difference between revisions of "CMU OAUTH PHP CLASS"

From CMU ITSC Network
Line 97: Line 97:
 
|}
 
|}
 
=== initOauth ===
 
=== initOauth ===
 +
Initial redirect to CMU Oauth for authorization.
 +
{| class="wikitable"
 +
|+ style="text-align:left;"|Description
 +
|-
 +
|initOauth()
 +
|}
 +
 +
{| class="wikitable"
 +
|+ style="text-align:left;"|Parameters
 +
|-
 +
|no parameter
 +
|}
 +
 +
{| class="wikitable"
 +
|+ style="text-align:left;"|Return Values
 +
|-
 +
| no return value
 +
|}
 +
 
=== getAccessToken ===
 
=== getAccessToken ===
 
=== getUserInfo ===
 
=== getUserInfo ===

Revision as of 11:21, 24 September 2017

Method

Constructor

Set Client ID, Client Secret, Redirect URI

Description
__construct([string $appId, string $clientSecret, string $redirectURI])
Parameters
name description
appId cmu oauth Client ID
clientSecret cmu oauth Client Secret
redirectURI cmu oauth Redirect URI
Return Values
no return value

setAppId

set Client ID

Description
setAppId(string $appid)
Parameters
name description
appid cmu oauth Client ID
Return Values
no return value

setAppSecret

Set Client Secret

Description
setAppSecret(string $appSecret)
Parameters
name description
appSecret cmu oauth Client Secret
Return Values
no return value

setCallbackUri

Set Redirect URI

Description
setCallbackUri(string $uri)
Parameters
name description
uri Application Callback / Redirect URI
Return Values
no return value

initOauth

Initial redirect to CMU Oauth for authorization.

Description
initOauth()
Parameters
no parameter
Return Values
no return value

getAccessToken

getUserInfo

Examples

Download

cmu.oauth.class.php.zip

Reference

https://oauth.cmu.ac.th
https://tools.ietf.org/html/rfc6749