Registry / auth / league-oauth2-server

league-oauth2-server

JSON →
library9.4.0phppackagistunverified

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all core specification grants.

composer require league/oauth2-server
INSTALL
IMPORT
SIG · LEAGUE-OAUTH2-SERV
L
league-oauth2-server
authphpv9.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AuthorizationServer
use League\OAuth2\Server\AuthorizationServer;

Sets up an OAuth 2.0 authorization server with the authorization code grant.

use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Grant\AuthCodeGrant; use League\OAuth2\Server\Repositories\ClientRepositoryInterface; $server = new AuthorizationServer( $clientRepository, $accessTokenRepository, $scopeRepository, 'file://private.key', 'file://public.key' ); $server->enableGrantType(new AuthCodeGrant($authCodeRepository, $refreshTokenRepository));
Debug
Known issues
gotchaRequires OpenSSL keys for token signing.
fix
Generate a private/public key pair using openssl.
affects: >=8.0.0
Upgrade
Version history
9.4.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
league-oauth2-server — pip install league-oauth2-server · libregistry