Releases: simplesquid/saloonphp-oauth
Releases · simplesquid/saloonphp-oauth
v0.1.0
Initial release.
Features
HasAutoRefreshtrait for SaloonAuthorizationCodeGrantconnectors — overridesdefaultAuth()to load, check expiry, and refresh tokens automatically.HasClientCredentialsCachetrait forClientCredentialsGrantconnectors — zero-config token caching with auto-acquisition.- Distributed locking (
CacheTokenLocker) with separate TTL and wait timeout, plus TOCTOU re-read inside the lock. EloquentTokenStorewith encrypted at-rest storage, soft revocation, and a revoke-resistantput()that refuses to un-revoke keys.- Best-effort persist in the traits: a transient DB failure after a successful refresh is reported via
report()and the fresh token is still returned to the caller. TokenStoreandTokenLockercontracts for swapping persistence and locking backends.InMemoryTokenStoreandNullLockershipped undersrc/Testingandsrc/Supportfor use in consumer tests.- Custom exceptions:
TokenRevokedException,TokenAcquisitionFailedException,LockTimeoutException,InvalidCacheStoreException.
Requirements
- PHP 8.4+
- Laravel ^12.0 || ^13.0
- Saloon v4
- A cache store that implements
LockProvider(Redis, Memcached, DynamoDB, or Database) —fileis not supported.
Notes
- API may change before v1.0.0 based on real-world integration feedback.