raegmaen/openid-connect-php 问题修复 & 功能扩展

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

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

raegmaen/openid-connect-php

最新稳定版本:0.2.1

Composer 安装命令:

composer require raegmaen/openid-connect-php

包简介

OpenID Connect client

README 文档

README

PHP library to authenticate users against an identity provider using the OpenId Connect protocol.
Use cases implemented:

  1. Authentication using the Authorization Code Flow
  2. Refreshing access token with refresh token

Requirements

  1. PHP 5.6 or greater
  2. CURL extension
  3. JSON extension

Install

Composer

composer require raegmaen/openid-connect-php

License

Apache License, Version 2.0

Example:

$openIdConnectClient = OpenIdConnectFactory::create(
    $providerUrl,
    $clientId,
    $clientSecret,
    $callbackUrl
);

$authenticationResult = $this->openIdConnectClient->authenticate($requestData);
if ($authenticationResult instanceof UserRedirect) {
    // Redirect user to given Url
}

$claims = $authenticationResult->getIdToken()->getClaims();

$name = $claims->get('given_name');

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 395
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-09-14