private-packagist / oidc-identities
Create OIDC tokens on different platforms
dev-main
2025-07-22 10:03 UTC
Requires
- php: ^7.2.5 || ^8.0
- php-http/client-common: ^1.9 || ^2.7
- psr/log: ^1.0 || ^2.0 || ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.4
- monolog/monolog: ^2
- nyholm/psr7: ^1.8
- php-http/mock-client: ^1.6
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.11.8
- phpstan/phpstan-deprecation-rules: ^1.2.0
- phpstan/phpstan-phpunit: ^1.4.0
- phpstan/phpstan-strict-rules: ^1.6.0
- phpunit/phpunit: ^8.5
- symfony/http-client: ^5.4
This package is auto-updated.
Last update: 2025-07-22 10:10:13 UTC
README
GitHub Action to publish artifacts as package versions to Private Packagist.
Requirements
PHP >= 7.2
Install
Via Composer:
$ composer require private-packagist/oidc-identities
Usage
Initiate a TokenGenerator
instance and call the generate
method with $audience
.
The TokenGenerator
will automatically try all supported platforms.
// Configure a HttpMethodsClient instance $oidcHttpClient = new HttpMethodsClient( Psr18ClientDiscovery::find(), Psr17FactoryDiscovery::findRequestFactory(), Psr17FactoryDiscovery::findStreamFactory(), ); $tokenGenerator = new TokenGenerator(new NullLogger(), $oidcHttpClient); $token = $tokenGenerator->generate($audience);
Copyright and License
The GitHub Action is licensed under the MIT License.