public function Github_Client::authenticate in Bibliography Module 7.2
Authenticate a user for all next requests
Parameters
string $login GitHub username:
string $secret GitHub private token or Github password if $method == AUTH_HTTP_PASSWORD:
string $method One of the AUTH_* class constants:
Return value
null
1 call to Github_Client::authenticate()
- Github_Client::deAuthenticate in modules/
CiteProc/ Github/ Client.php - Deauthenticate a user for all next requests
File
- modules/
CiteProc/ Github/ Client.php, line 71
Class
- Github_Client
- Simple yet very cool PHP Github client
Code
public function authenticate($login, $secret, $method = NULL) {
if (!$method) {
$method = self::AUTH_URL_TOKEN;
}
$this
->getHttpClient()
->setOption('auth_method', $method)
->setOption('login', $login)
->setOption('secret', $secret);
}