src/login_github.php
public static function get_user_info($oauth_token) {
	$url     = 'https://api.github.com/user';
	$options = [
		'headers' => [
			'Accept' => 'application/json',
			'Authorization' => 'token '.$oauth_token,
		],
	];
	
	$http = new \GuzzleHttp\Client();
	return $http->get($url, $options)->json();
}
public static function get_user_info($oauth_token) {
	$url     = 'https://api.github.com/user';
	$options = [
		'headers' => [
			'Accept' => 'application/json',
			'Authorization' => 'token '.$oauth_token,
		],
	];
	
	$http = new \GuzzleHttp\Client();
	return $http->get($url, $options)->json();
}
public static function get_user_info ( $ oauth_token ) { $ url = 'https://api.github.com/user' ; $ options = [ 'headers' => [ 'Accept' => 'application/json' , 'Authorization' => 'token ' . $ oauth_token , ] , ] ; $ http = new \ GuzzleHttp \ Client ( ) ; return $ http -> get ( $ url , $ options ) -> json ( ) ; }
gets a users github account details for a given oauth token

@param  string $oauth_token
@return array               can be expected to contain a 'login' key with the github username
gets a users github account details for a given oauth token