Class JGithubPackageAuthorization
GitHub API Authorization class for the Joomla Platform.
-
JGithubObject
-
JGithubPackage
-
JGithubPackageAuthorization
Methods summary
public
object
|
#
create( array $scopes = array(), string $note = '', string $url = '' )
Method to create an authorization.
Method to create an authorization.
Parameters
- $scopes
array - $scopes A list of scopes that this authorization is in.
- $note
string - $note A note to remind you what the OAuth token is for.
- $url
string - $url A URL to remind you what app the OAuth token is for.
Returns
object
Throws
Since
12.3
|
public
object
|
#
delete( integer $id )
Method to delete an authorization
Method to delete an authorization
Parameters
- $id
integer - $id ID of the authorization to delete
Returns
object
Throws
Since
12.3
|
public
object
|
#
edit( integer $id, array $scopes = array(), array $addScopes = array(), array $removeScopes = array(), string $note = '', string $url = '' )
Method to edit an authorization.
Method to edit an authorization.
Parameters
- $id
integer - $id ID of the authorization to edit
- $scopes
array - $scopes Replaces the authorization scopes with these.
- $addScopes
array - $addScopes A list of scopes to add to this authorization.
- $removeScopes
array - $removeScopes A list of scopes to remove from this authorization.
- $note
string - $note A note to remind you what the OAuth token is for.
- $url
string - $url A URL to remind you what app the OAuth token is for.
Returns
object
Throws
Since
12.3
|
public
object
|
#
get( integer $id )
Method to get details about an authorised application for the authenticated
user.
Method to get details about an authorised application for the authenticated
user.
Parameters
- $id
integer - $id ID of the authorization to retrieve
Returns
object
Throws
Since
12.3
Note
This method will only accept Basic Authentication
|
public
object
|
#
getList( )
Method to get the authorised applications for the authenticated user.
Method to get the authorised applications for the authenticated user.
Returns
object
Throws
Since
12.3
Note
This method will only accept Basic Authentication
|
public
object
|
#
getRateLimit( )
Method to get the rate limit for the authenticated user.
Method to get the rate limit for the authenticated user.
Returns
object
Throws
Since
12.3
|
public
JUri
|
#
getAuthorizationLink( string $client_id, string $redirect_uri = '', string $scope = '', string $state = '' )
1. Request authorization on GitHub.
1. Request authorization on GitHub.
Parameters
- $client_id
string - $client_id The client ID you received from GitHub when you registered.
- $redirect_uri
string - $redirect_uri URL in your app where users will be sent after authorization.
- $scope
string - $scope Comma separated list of scopes.
- $state
string - $state An unguessable random string. It is used to protect against cross-site
request forgery attacks.
Returns
Since
3.3 (CMS)
|
public
string
|
#
requestToken( string $client_id, string $client_secret, string $code, string $redirect_uri = '', string $format = '' )
2. Request the access token.
2. Request the access token.
Parameters
- $client_id
string - $client_id The client ID you received from GitHub when you registered.
- $client_secret
string - $client_secret The client secret you received from GitHub when you registered.
- $code
string - $code The code you received as a response to Step 1.
- $redirect_uri
string - $redirect_uri URL in your app where users will be sent after authorization.
- $format
string - $format The response format (json, xml, ).
Returns
string
Throws
Since
3.3 (CMS)
|
__get()
__construct()
,
fetchUrl()
,
processResponse()
Magic methods summary
Properties summary
$name
,
$packages
$client
,
$options