oclockdev/keycloak-jwt-guard
最新稳定版本:v1.1.1
Composer 安装命令:
composer require oclockdev/keycloak-jwt-guard
包简介
A library to decode JWT provided by Keycloak
README 文档
README
A library to decode JWT provided by Keycloak
How to use?
<?php use Oclockdev\KeycloakJwtGuard\Guard\KeycloakGuard; require_once "./vendor/autoload.php"; // Get the bearer token from the request $accessToken = $_SERVER['HTTP_AUTHORIZATION']; // Create a new instance of KeycloakGuard with Keycloak server info $keycloakGuard = new KeycloakGuard([ "serverUrl" => "https://localhost:8080", "realm" => "master", "accessToken" => $accessToken ]); // Authenticate with the access token and return the JWT payload $payload = $keycloakGuard->authenticate(); // Call the userinfo keycloak endpoint with the access token $userinfo = $keycloakGuard->getOwnerRessource();
统计信息
- 总下载量: 300
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-11