iducksrl/ider-openid-client-php 问题修复 & 功能扩展

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

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

iducksrl/ider-openid-client-php

最新稳定版本:1.1.5

Composer 安装命令:

composer require iducksrl/ider-openid-client-php

包简介

IDER OpenID Generic Client for PHP

README 文档

README

A simple library that allows an application to authenticate a user through the IDer authentication platform. This library hopes to encourage OpenID Connect use by making it simple enough for a developer with little knowledge of the OpenID Connect protocol to setup authentication.

This work is based on OpenIDConnectClient for PHP5 by Michael Jett. Thanks.

Requirements

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

Install

  1. Install library using composer
composer require iducksrl/ider-openid-client-php
  1. Include composer autoloader
require '/vendor/autoload.php';

Example 1: Basic Client

// Set a log file
\IDERConnect\IDEROpenIDClient::$IDERLogFile = './ider-connect.log';

// Instanziate
$iderconnect = new \IDERConnect\IDEROpenIDClient($client_id, $client_secret, $extra_scopes);

// Set extra scopes or reset it
$iderconnect->setScope('my_extra_scope');


// Connect
$iderconnect->authenticate();

// Request user info
$userInfo = $iderconnect->requestUserInfo();

See openid spec for available user attributes

Example 2: Network and Security

// Configure a proxy
$oidc->setHttpProxy("http://my.proxy.com:80/");

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2024-06-22