mglinski / laravel-crowd-auth
将Atlassian Crowd身份验证简单地集成到您的应用程序中。
v1.1.2
2017-08-04 11:51 UTC
Requires
- php: >=5.6.9
- ext-json: *
- ext-mbstring: *
- guzzlehttp/psr7: ^1.3
- illuminate/auth: ^5.3
- illuminate/database: ^5.3
- illuminate/support: ^5.3
- php-http/cache-plugin: ^1.2
- php-http/discovery: ^1.1
- php-http/guzzle6-adapter: ^1.1
- php-http/httplug: ^1.1
- php-http/message-factory: ^1.0
Requires (Dev)
- mockery/mockery: 0.9.*
- orchestra/testbench: 3.3.*
- phpunit/phpunit: 5.0
README
将Atlassian Crowd身份验证简单地集成到您的应用程序中。
支持的版本:仅支持Atlassian Crowd 2.1及以后的版本。
快速开始
Laravel 5.3.x
通过运行dcomposer require来安装包
composer require mglinski/laravel-crowd-auth
在您的 config/app.php
中,将 Crowd\Auth\CrowdAuthApiServiceProvider::class
和 Crowd\Auth\CrowdAuthServiceProvider::class
添加到 providers
数组的末尾
'providers' => [
...
Crowd\Auth\CrowdAuthApiServiceProvider::class,
Crowd\Auth\CrowdAuthServiceProvider::class,
],
现在生成Crowd Auth迁移(确保您已经设置好数据库配置)
$ php artisan vendor:publish --tag=migrations
$ php artisan migrate
这将设置三个表 - crowd_auth_users
、crowd_auth_groups
和 crowd_auth_group_auth_user
。
现在发布此包的配置文件
$ php artisan vendor:publish --tag=config
配置发布后,转到您的 config/crowd_auth.php
并配置您的Atlassian Crowd设置。
在您配置了Atlassian Crowd设置后,需要将 config/auth.php
中的 driver
设置更改为
'driver' => 'crowd',
完成以上所有步骤后,您可以直接使用 Auth::Attempt()
来尝试使用您的Atlassian Crowd服务器进行登录。