PHPackages                             gpht/oidc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gpht/oidc

ActiveLibrary

gpht/oidc
=========

OIDC (OpenID Connect) library

1.1.0(9mo ago)02.6k↑21.4%MITPHPPHP &gt;=8.3CI failing

Since Aug 13Pushed 9mo agoCompare

[ Source](https://github.com/fotografde/oidc)[ Packagist](https://packagist.org/packages/gpht/oidc)[ RSS](/packages/gpht-oidc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (4)Used By (0)

OIDC Library
============

[](#oidc-library)

A PHP library for OpenID Connect (OIDC) integration with AWS Cognito support and Symfony Security component integration.

Features
--------

[](#features)

- **OIDC Client Credentials Flow**: Machine-to-machine authentication with AWS Cognito
- **PSR-6 Token Caching**: Built-in token caching with expiration handling for performance
- **Symfony Security Integration**: User provider for OIDC-based authentication
- **Type Safety**: Full PHP 8.3+ type annotations with Psalm static analysis
- **Modern PHP**: Uses readonly classes, strict types, and latest PHP features

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- Symfony 6.4+ or 7.0+

Installation
------------

[](#installation)

```
composer require gpht/oidc
```

Usage
-----

[](#usage)

### 1. OIDC Client Token (Machine-to-Machine Authentication)

[](#1-oidc-client-token-machine-to-machine-authentication)

Use `OidcClientToken` to obtain access tokens for machine-to-machine communication:

```
