/gitlab

GitLab OAuth2 for yii2-authclient

Primary LanguagePHPOtherNOASSERTION

yiiauth/gitlab

This extension adds GitLab OAuth2 supporting for yii2-authclient.

Latest Stable Version Total Downloads Monthly Downloads License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require yiiauth/gitlab

or add

"yiiauth/gitlab": "~0.1"

to the require section of your composer.json.

Usage

You must read the yii2-authclient docs

Register your application in GitLab

and add the GitLab client to your auth clients.

'components' => [
    'authClientCollection' => [
        'class' => yii\authclient\Collection::class,
        'clients' => [
               'gitlab' => [
                   'class' => \yiiauth\gitlab\GitLabClient::class,
                   'domain'  => 'https://gitlab.com'
                   'clientId' => 'gitlab_client_id',
                   'clientSecret' => 'gitlab_client_secret',
               ],
            // other clients
        ],
    ],
    // ...
 ]