spomky-labs/oauth2-server-scope-manager
A PHP package for managing OAuth 2.0 scopes in the spomky-labs OAuth2 server ecosystem. It helps define, validate, and resolve scopes for authorization requests and access tokens, simplifying scope handling in your OAuth2 server.
orders:read, orders:write, payouts:initiate) and deciding how coarse or fine-grained it should be.league/oauth2-server), not this class.league/oauth2-server mean this is best treated as a design reference, not a dependency. It informs the decision; it shouldn't be the implementation.Consider it only if all of the following hold:
spomky-labs/oauth2-server (or a legacy fork of it) and need to swap or extend the ScopeManagerInterface implementation without re-platforming.Look elsewhere in essentially every other case:
league/oauth2-server, which is actively maintained, widely depended upon, and has a ScopeInterface plus scope-validation hooks covering the same ground.Executive summary. This is a small, single-purpose library that validates and enforces OAuth2 scopes — the mechanism that limits what a third-party app or integration can do with a user's data. It is not a product feature on its own; it is plumbing that sits under an API permissions model. The package itself is unmaintained and has essentially no adoption, and the broader project it belongs to has been superseded by a well-supported alternative. Recommendation: do not adopt it as a dependency. Use it, if at all, as a design reference when we scope out an API permissions model, and implement that model on Laravel Passport or league/oauth2-server.
For engineering. The package contributes one piece of the OAuth2 authorization flow: parsing a requested scope string, resolving it against registered scopes, and deciding grant/deny per client and per user. That logic is a few hundred lines and is already provided, better maintained, inside league/oauth2-server (and therefore Passport). Adopting it means carrying an unowned dependency for functionality we'd get for free from a library we're already likely to install. If we're on the legacy Spomky stack, pin and vendor it; if we're building new, port the interface shape — a ScopeManager that answers "is this scope registered / is it granted to this client / does this token carry it" — and back it with Passport's scope repository.
Risk framing for the decision log. Low technical risk to skip it; moderate long-term risk to depend on it (no maintainer activity, no downstream users to surface bugs, no security patch path). The product need — bounded, auditable, consent-visible API permissions — is real and on the roadmap. The package is not the way to meet it.
How can I help you explore Laravel packages today?