stefanopascazi/keycloak-auth-php
Composer 安装命令:
composer require stefanopascazi/keycloak-auth-php
包简介
Beautifull and fast module for authenticate with OAuth2 use Keycloak.
README 文档
README
Beautifull and fast module for authenticate with OAuth2 use Keycloak.
<?php session_start(); require __DIR__ . "/vendor/autoload.php"; use KeycloakLibrary\KeycloakAuthPhp\Keycloak; Keycloak::init( json_decode('{ "realm": "myrealm", "auth-server-url": "https://your-keycloak-domain.com/", "ssl-required": "external", "resource": "myclient", "public-client": true, "confidential-port": 0 }', true), "https://your-app-domain.com/auth.php"); echo Keycloak::auth()->createLoginString(); ?>
Installation
This is a PHP module available through the packagist registry.
Before installing, download and install PHP. PHP 8.0.2 or higher is required.
If this is a brand new project, make sure to create a composer.json first with the composer init command.
Installation is done using the composer require command:
$ composer require stefanopascazi/keycloak-auth-php`
Example
https://github.com/stefanopascazi/keycloak-auth-php/tree/main/example
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-13