jinna/keycloakapiservices 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

jinna/keycloakapiservices

Composer 安装命令:

composer require jinna/keycloakapiservices

包简介

This is for keycloak rest api services

README 文档

README

iSportz iSportz

Platformization Keycloak REST API Service

Platformization Keycloak is a Laravel package that gives you access to keycloak's admin REST APIs.

For API references visit Keycloak Admin REST API, To understand Keycloak Administration refer Server Administration Guide.

Getting Started

Installation

Keycloak admin API requires

PHP >= 8.0

Laravel >= 9.0

Guzzlehttp >= 7.2

Keycloakapiservices package require below dependency packages.

    "require": {
        "php": "^8.0",
        "laravel/framework": "^9.0",
        "guzzlehttp/guzzle": "^7.2"
    },

Run the below command to install the package.

composer require jinna/keycloakapiservices

Publish the keycloakapi config file using php artisan vendor:publish --provider="KeycloakApiServices\KeycloakApiServiceProvider" --tag="config", A config file keycloakapiservices.php will be created in config folder

Add KeycloakApiServices\KeycloakApiServiceProvider::class in config/app.php file, at the end of 'providers' => [] array like below.

'providers' => [
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
        KeycloakApiServices\KeycloakApiServiceProvider::class
    ],

Add the below code in app/Providers/RouteServiceProvider.php file inside boot() method's $this->routes(function () {}) group like below.

    public function boot()
    {
        $this->configureRateLimiting();            
        $this->routes(function () {
            Route::prefix('api')
                ->middleware('api')
                ->namespace($this->namespace)
                ->group(base_path('vendor/jinna/keycloakapiservices/src/routes/api.php'));
        });
    }

Add/config the below variables in your .env file with appropriate values.

//Keycloak Server Url
KEYCLOAK_BASE_URL="https://keycloakauth.yourdomain.com"
KEYCLOAK_REALM_ENDPOINT=/admin/realms
KEYCLOAK_CLIENTS_ENDPOINT=/clients
KEYCLOAK_ROLES_ENDPOINT=/roles
KEYCLOAK_ADMIN_CLIENT_ID=admin-cli
KEYCLOAK_ADMIN_USERNAME=keycloakadminusername
KEYCLOAK_ADMIN_PASSWORD="keycloakadminpassword"

Documentation

Basic Usage

Refer the Postman collection Platform KeyCloak API.postman_collection which you can find inside this package folder.

License

Platformization Keycloak REST API Service is owned by iSportz . Reach out LICENSE for more details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固