Skip to content

Commit c574161

Browse files
SOHELAHMED7m1guelpf
authored andcommitted
updated readme
doc enahncement
1 parent e51b7d5 commit c574161

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ $client = \Gitlab\Client::create('http://git.yourdomain.com')
4141
->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN)
4242
;
4343

44+
// or for OAuth2 (see https://github.com/m4tthumphrey/php-gitlab-api/blob/master/lib/Gitlab/HttpClient/Plugin/Authentication.php#L47)
45+
$client = \Gitlab\Client::create('http://gitlab.yourdomain.com')
46+
->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_OAUTH_TOKEN)
47+
;
48+
4449
$project = $client->api('projects')->create('My Project', array(
4550
'description' => 'This is a project',
4651
'issues_enabled' => false

0 commit comments

Comments
 (0)