|
| create (array $scopes=array(), $note='', $url='') |
|
| delete ($id) |
|
| edit ($id, array $scopes=array(), array $addScopes=array(), array $removeScopes=array(), $note='', $url='') |
|
| get ($id) |
|
| getList () |
|
| getRateLimit () |
|
| getAuthorizationLink ($clientId, $redirectUri='', $scope='', $state='') |
|
| requestToken ($clientId, $clientSecret, $code, $redirectUri='', $format='') |
|
| __get ($name) |
|
| __construct (Registry $options=null, JGithubHttp $client=null) |
|
GitHub API Authorization class for the Joomla Platform.
https://developer.github.com/v3/oauth/
- Depuis
- 3.1.4
- Obsolète:
- 4.0 Use the
joomla/github
package via Composer instead
◆ create()
create |
( |
array |
$scopes = array() , |
|
|
|
$note = '' , |
|
|
|
$url = '' |
|
) |
| |
Method to create an authorization.
- Paramètres
-
array | $scopes | A list of scopes that this authorization is in. |
string | $note | A note to remind you what the OAuth token is for. |
string | $url | A URL to remind you what app the OAuth token is for. |
- Exceptions
-
- Depuis
- 3.1.4
- Renvoie
- object
Références $data, $path, $url, et json_encode.
◆ delete()
Method to delete an authorization
- Paramètres
-
integer | $id | ID of the authorization to delete |
- Exceptions
-
- Depuis
- 3.1.4
- Renvoie
- object
Références $id, et $path.
◆ edit()
edit |
( |
|
$id, |
|
|
array |
$scopes = array() , |
|
|
array |
$addScopes = array() , |
|
|
array |
$removeScopes = array() , |
|
|
|
$note = '' , |
|
|
|
$url = '' |
|
) |
| |
Method to edit an authorization.
- Paramètres
-
integer | $id | ID of the authorization to edit |
array | $scopes | Replaces the authorization scopes with these. |
array | $addScopes | A list of scopes to add to this authorization. |
array | $removeScopes | A list of scopes to remove from this authorization. |
string | $note | A note to remind you what the OAuth token is for. |
string | $url | A URL to remind you what app the OAuth token is for. |
- Exceptions
-
RuntimeException | |
DomainException | |
- Depuis
- 3.1.4
- Renvoie
- object
Références $data, $id, $path, $url, et json_encode.
◆ get()
Method to get details about an authorised application for the authenticated user.
- Paramètres
-
integer | $id | ID of the authorization to retrieve |
- Exceptions
-
- Depuis
- 3.1.4
- Note
- This method will only accept Basic Authentication
- Renvoie
- object
Références $id, et $path.
◆ getAuthorizationLink()
getAuthorizationLink |
( |
|
$clientId, |
|
|
|
$redirectUri = '' , |
|
|
|
$scope = '' , |
|
|
|
$state = '' |
|
) |
| |
- Request authorization on GitHub.
- Paramètres
-
string | $clientId | The client ID you received from GitHub when you registered. |
string | $redirectUri | URL in your app where users will be sent after authorization. |
string | $scope | Comma separated list of scopes. |
string | $state | An unguessable random string. It is used to protect against cross-site request forgery attacks. |
- Depuis
- 3.3 (CMS)
- Renvoie
- JUri
Références $clientId, $redirectUri, $state, et $uri.
◆ getList()
Method to get the authorised applications for the authenticated user.
- Exceptions
-
- Depuis
- 3.1.4
- Note
- This method will only accept Basic Authentication
- Renvoie
- object
Références $path.
◆ getRateLimit()
Method to get the rate limit for the authenticated user.
- Exceptions
-
- Depuis
- 3.1.4
- Renvoie
- object
Références $path.
◆ requestToken()
requestToken |
( |
|
$clientId, |
|
|
|
$clientSecret, |
|
|
|
$code, |
|
|
|
$redirectUri = '' , |
|
|
|
$format = '' |
|
) |
| |
- Request the access token.
- Paramètres
-
string | $clientId | The client ID you received from GitHub when you registered. |
string | $clientSecret | The client secret you received from GitHub when you registered. |
string | $code | The code you received as a response to Step 1. |
string | $redirectUri | URL in your app where users will be sent after authorization. |
string | $format | The response format (json, xml, ). |
- Exceptions
-
- Depuis
- 3.3 (CMS)
- Renvoie
- string
Références $clientId, $data, $format, $redirectUri, $uri, et false.
La documentation de cette classe a été générée à partir du fichier suivant :