定制 raditzfarhan/fimm-keycloak 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

raditzfarhan/fimm-keycloak

Composer 安装命令:

composer require raditzfarhan/fimm-keycloak

包简介

A simple Keycloak package to manage access level for FIMM system.

README 文档

README

A simple keycloak package for FIMM to manage the access control. This package will contain the Role middleware so that each route can be configured to be accessed by certain roles only.

Installation

You can install the package via composer:

composer require raditzfarhan/fimm-keycloak

Configuration

First you will need to add the role middleware to the Kernel in route middleware section.

protected $routeMiddleware = [
    ...
    'role' => \RaditzFarhan\FimmKeycloak\Middleware\KeycloakRole::class,
];

Then set the default Client ID in .env

FIMM_KEYCLOAK_CLIENT_ID=fimm-app

Usage

Then you can start using the role middleware in your route.

// The routes in this group will only be accessible by consultant role
Route::middleware(['role:consultant'])->group(function () {
    // your routes here
});

// The routes in this group will only be accessible by fimm_admin or consultant role
Route::middleware(['role:fimm_admin|consultant'])->group(function () {
    // your code here
});

// If by any reason you need to use a different client, just append the client name using @ symbol
// The routes in this group will only be accessible by distributor_admin role from another-app client
Route::middleware(['role:distributor_admin@another-app'])->group(function () {
    // your code here
});

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email raditzfarhan@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固