ageid/aad
Composer 安装命令:
composer require ageid/aad
包简介
This package allows obtaining / validating an authentication token from Azure Active Directory
关键字:
README 文档
README
| services | active-directory |
|---|---|
| platforms | php |
| author | AgeID |
Authenticating requests to an Azure AD resource from a PHP web app
This PHP class allows obtaining an authentication token object from Azure Active Directory, which in turn is used to generate an Authorization header that you must add to all your requests to the desired Azure Active Directory application (resource). This class uses OAuth 2.0 Client Credentials to authenticate and get authorization to the Graph API. Pre-existing access to an Azure tenant is required. Using a standard Microsoft account will not be enough.
Using the PHP class
- Construct your AzureActiveDirectoryHelper instance by passing the $clientId, $tenant and, if desired, a custom implementation of the Guzzle client inside $options['httpClient']
- Obtain an Auth Token object by providing the appropriate parameter values, as generated and obtained from above: $authToken = $aadHelper->getToken($clientId, $resource).
- Prepare your cURL request to the AAD service according to its API usage definition.
- Add the obtained $authToken to your cURL request along with any other applicable headers. Example: curl_setopt($ch, CURLOPT_HTTPHEADER, array($authToken, 'OtherExampleHeaderName:OtherExampleHeaderValue', ...)).
- Execute the cURL request.
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-06-06