定制 khoelck/phpazureauth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

khoelck/phpazureauth

最新稳定版本:v1.6

Composer 安装命令:

composer require khoelck/phpazureauth

包简介

A library to generate Azure tokens for consuming services, using ROPC authentication method via PHP.

README 文档

README

PhpAzureAuth is a very simple PHP library to generate Azure tokens for consuming services, specifically using ROPC authentication method via PHP. More on that from Microsoft here.

It is a dependency package of the PhpPowerBI package.

Installation

The recommended way to install is via composer

Composer install

composer require khoelck/phpazureauth

PhpAzureAuth on Packagist

Manual install

Copy the contents of the src folder to your include_path, and include the libraries in your authentication script as below:

require "include_path/AzureAuth/Scope.php";
require "include_path/AzureAuth/AzureAuth.php";
use Khoelck\PhpAzureAuth\AzureAuth;
use Khoelck\PhpAzureAuth\Scope;

Initial Configuration

Before using this in your code, navigate to the install folder (vendor/khoelck/phpazureauth/src for composer installs) and copy the AzureConfig.php file to your include_path.

The following values will need to be configured for your app:

  • Azure Client ID
  • Azure Client Secret
  • Azure OAuth 2.0 token auth URL
  • Azure Tenant ID

Because this project relies on the config file, be sure to also include it on any page AzureAuth is used in addition to your composer autoload.

require "include_path/AzureConfig.php";

Use

This package is primarily designed to be used inside of your app's authentication script. Used within this script, the username and password will be able to be passed through to the AzureAuth constructor, then used to obtain the token. Please see Example.php for more information.

Related packages

While this can certainly be used on it's own in your project, it's designed to use with the downstream project PhpPowerBI.

PhpPowerBI

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-26