slepic/apple-sign-in-client-secret-generator
最新稳定版本:0.1.2
Composer 安装命令:
composer require slepic/apple-sign-in-client-secret-generator
包简介
PHP package for generating 'client secret' for Sign In with Apple
README 文档
README
Description
This package provides class that generates token derived from your private key using ES256 JWT algorithm. For more info check useful links
Requirements
PHP >= 8.0
Installation
Install the composer package:
composer require slepic/apple-sign-in-client-secret-generator
Example Usage
<?php use Slepic\AppleSignInClientSecretGenerator\AppleSignInClientSecretGenerator; $clientId = 'com.example.TESTAPP'; $teamId = 'FOO123BAR456'; $keyId = '654RAB321OOF'; $certPath = __DIR__ . '/certificate.p8'; $privateKey = \file_get_contents($certPath); $clientSecret = new AppleSignInClientSecretGenerator(); echo $clientSecret->generate($clientId, $teamId, $keyId, $privateKey);
Credit
The project was originally forked from: kissdigital-com/apple-sign-in-client-secret-generator
When migrating from kissdigital.com solution, you must:
- replace the class name
- pass your credentials to the
generate()method instead of the class constructor - extract the private key from the file by your own means and only pass its contents to the
generate()method
统计信息
- 总下载量: 7.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-07