承接 uisits/laravel-oidc 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

uisits/laravel-oidc

Composer 安装命令:

composer require uisits/laravel-oidc

包简介

Shibboleth OIDC driver for Laravel Socialite

README 文档

README

Laravel Shibboleth is a comprehensive authentication package for Laravel applications that provides seamless integration with Shibboleth and OpenID Connect (OIDC) authentication protocols. This package supports OIDC authentication methods, allowing flexible implementation based on your organization's requirements. It includes features for user authorization via Spatie/permissions package, token introspection, and a simple installation process to get your authentication system up and running quickly.

Usage:

  • Install the package: composer require uisits/laravel-oidc

  • Important: Install the package: php artisan shibboleth:install

Running this command performs the following actions:

  • Installs spatie/laravel-permission in your app.
  • Publish assets such as images, build assets to appropriate directories in your project.
  • Publish the shibboleth-oidc.php config file to your config folder.
  • Publish migrations.
  • Set environment variables in .env file (Check the config/shibboleth.php file)
  • For Tri-Campus authentication, set the environment variables as per the config file and set 'tri-campus-provider' => true, in config/shibboleth-oidc.php file.

Migrate database

Run php artisan migrate

You can extend the roles and permissions functionality to add new roles or permissions using Spatie Permission package

Token Introspection

For token introspection using OIDC add the following middleware to the app/Http/Kernel.php file:

Under alias property:

'introspect' => \UisIts\Oidc\Http\Middleware\Introspect::class,

Now you can use the middleware on your protected route as such:

use UisIts\Oidc\Http\Middleware\Introspect;

Route::middleware(['introspect'])->get('/introspect', function (Request $request) {
    dump($request->bearerToken());
    dd(Introspect::getUserFromToken($request->bearerToken()));
})->name('introspect');

Note: Below is the response received when you get a user from token

Introspect::getUserFromToken($request->bearerToken());

array:8 [▼ // routes/api.php:24
  "sub" => "xyz@abc.org"
  "uisedu_is_member_of" => array:42 [▶]
  "uisedu_uin" => "123456789"
  "preferred_username" => "xyz"
  "given_name" => "John"
  "preferred_display_name" => "Doe, John"
  "family_name" => "Doe"
  "email" => "xyz@abc.org"
];

Code Style

You can use Laravel pint to automatically fix code styles. ./vendor/bin/pint

Testing

You can run the tests for the package using pest. ./vendor/bin/pest

Issues and Concerns

Please open an issue on the GitHub repository with detailed description and logs (if available).

In case of security concerns, please write an email to UIS ITS ADDS Team.

uisits/laravel-oidc 适用场景与选型建议

uisits/laravel-oidc 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.21k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 06 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「shibboleth」 「socialite」 「Laravel Socialite Shibboleth Provider」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 uisits/laravel-oidc 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 uisits/laravel-oidc 我们能提供哪些服务?
定制开发 / 二次开发

基于 uisits/laravel-oidc 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-09