Download the PHP package surfoo/oauth2-geocaching without Composer
On this page you can find all versions of the php package surfoo/oauth2-geocaching. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download surfoo/oauth2-geocaching
More information about surfoo/oauth2-geocaching
Files in surfoo/oauth2-geocaching
Package oauth2-geocaching
Short Description Geocaching OAuth 2.0 Client Provider for The PHP League OAuth2-Client
License MIT
Informations about the package oauth2-geocaching
Geocaching Provider for OAuth 2.0 Client
This package provides Geocaching OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
Usage
Usage is the same as The League's OAuth client, using \League\OAuth2\Client\Provider\Geocaching as the provider.
Authorization Code Flow
Environments
| Environment | Description | URLs |
|---|---|---|
production, prod |
Official Geocaching.com | geocaching.com, api.groundspeak.com |
staging, qa |
Staging environment | staging.geocaching.com |
dev, development, docker, test |
Local development | localhost:8000 |
Custom URLs for Development
You can override environment URLs for your own development infrastructure:
Factory Helpers for Common Patterns
Advanced Configuration Examples
Docker Compose Setup:
Enterprise Infrastructure:
Multi-Environment Deployment:
Take a look at demo/index.php for complete examples.
Resource Owner (User Data)
After obtaining an access token, you can retrieve user information:
Custom Resource Owner Fields
By default, the provider requests a standard set of user fields. You can customize which fields to retrieve:
Token Management & Refresh
This package ships token lifecycle utilities you can plug into any PSR-18 client:
TokenSet: lightweight DTO for access/refresh tokens with expiry helpers.TokenStorageInterface: implement to persist tokens (DB, cache, file) with locking.TokenRefreshPlugin: HTTPlug/PSR plugin that refreshes tokens on401and retries the original request.- Exceptions for refresh/storage errors:
TokenRefreshException,RefreshTokenExpiredException,TokenStorageException.
Basic wiring:
See demo/index.php for a full flow including PKCE, token storage, and a sample API call with automatic refresh. In production, replace the in-memory storage with a durable implementation.
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of oauth2-geocaching with dependencies
league/oauth2-client Version ^2.9
php-http/client-common Version ^2.7
php-http/promise Version ^1.1
psr/log Version ^3.0