mglinski/laravel-crowd-auth

将Atlassian Crowd身份验证简单地集成到您的应用程序中。

v1.1.2 2017-08-04 11:51 UTC

This package is auto-updated.

Last update: 2024-09-11 16:29:46 UTC


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::classCrowd\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_userscrowd_auth_groupscrowd_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服务器进行登录。