Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiiauth/gitlab
GitLab OAuth2 for yii2-authclient
https://github.com/yiiauth/gitlab
gitlab gitlab-oauth2 oauth2-client yii2-authclient yii2-extension
Last synced: about 2 months ago
JSON representation
GitLab OAuth2 for yii2-authclient
- Host: GitHub
- URL: https://github.com/yiiauth/gitlab
- Owner: yiiauth
- License: other
- Created: 2018-05-11T11:21:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T07:30:11.000Z (10 months ago)
- Last Synced: 2024-10-07T17:01:13.208Z (3 months ago)
- Topics: gitlab, gitlab-oauth2, oauth2-client, yii2-authclient, yii2-extension
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# yiiauth/gitlab
This extension adds GitLab OAuth2 supporting for [yii2-authclient](https://github.com/yiisoft/yii2-authclient).
[![Latest Stable Version](https://poser.pugx.org/yiiauth/gitlab/v/stable)](https://packagist.org/packages/yiiauth/vk)
[![Total Downloads](https://poser.pugx.org/yiiauth/gitlab/downloads)](https://packagist.org/packages/yiiauth/gitlab)
[![Monthly Downloads](https://poser.pugx.org/yiiauth/gitlab/d/monthly)](https://packagist.org/packages/yiiauth/gitlab)
[![License](https://poser.pugx.org/yiiauth/gitlab/license)](https://packagist.org/packages/yiiauth/gitlab)## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require yiiauth/gitlab
```or add
```json
"yiiauth/gitlab": "~0.1"
```to the `require` section of your composer.json.
## Usage
You must read the yii2-authclient [docs](https://github.com/yiisoft/yii2/blob/master/docs/guide/security-auth-clients.md)
Register your application [in GitLab](https://gitlab.com/profile/applications)
and add the GitLab client to your auth clients.
```php
'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
],
],
// ...
]
```