aria-php/keycloak-api 问题修复 & 功能扩展

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

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

aria-php/keycloak-api

Composer 安装命令:

composer require aria-php/keycloak-api

包简介

Tools for interfacing with the Keycloak API

README 文档

README

This repository is the very initial outline for interfacing with the Keycloak account_api.

Usage

To add this to your project:

composer require aria-php/keycloak-api

Supported features

This API wrapper supports the ability to:

Account API

  • Retrieve the profile of your user (as identified by your access_token sent as a bearer token)
  • Update the profile
  • Set the user's password

e.g.

use ARIA\KeycloakAPI\AccountAPI;

...

$api = new AccountAPI($client_id, $secret, 'master', 'http://localhost:8080');
$api->setBearer($access_token);


$profile = $api->getProfile();


// Make your updates here


$api->setProfile($profile);


Authentication

Your user is identified by obtaining an access token from keycloak for the user, and then passing it as a bearer token.

Note: this is the access_token, not the id_token.

Testing

In order to run the unit tests you need to set up some environment variables:

  • KEYCLOAK_USER is the user you're trying to connect to
  • KEYCLOAK_PASS their password
  • KEYCLOAK_REALM the keycloak realm (e.g. "master")
  • KEYCLOAK_CLIENT_ID the keycloak client id (e.g. "account")
  • KEYCLOAK_SECRET the client secret
  • KEYCLOAK_BASEURL the base URL, e.g. "http://localhost:8080"

You will also need to enable "Direct access grants" for your client.

Licence

LGPLv3 - Please see LICENSE.txt for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2020-10-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固