Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Passport Authorization Core Laravel Package

n3xt0r/laravel-passport-authorization-core

Core components for building OAuth2 authorization flows with Laravel Passport. Provides reusable helpers and abstractions to standardize consent/approval handling and authorization logic, making it easier to implement custom Passport authorization endpoints and UI.

View on GitHub
Deep Wiki
Context7
1.3.0

Added

  • Support for Laravel 13.
1.2.4
1.2.3
1.2.2
1.2.1

Fixed

  • Added missing Composer autoload namespace for package database seeders.
1.2.0

Added

  • Added context_client_id column to the passport_scope_grants table to explicitly associate scope grants with an OAuth client context.
  • Enabled client-scoped authorization grants for all grant types where a tokenable (e.g. user or service account) acts in the context of a specific client.
  • Improved authorization clarity and auditability by making client context an explicit part of scope grant assignments.
  • Introduced GrantableTokenableResolver to centralize resolution and validation of grantable tokenables and their active client context.
  • Added GrantableTokenableContext DTO to represent resolved authorization context in a typed, explicit form.
  • Added domain events for tokenable grant lifecycle:
    • TokenableGrantsAssigned
    • TokenableGrantsRevoked
    • TokenableGrantsUpserted
  • Added application use cases for managing tokenable grants:
    • assign grants to tokenables
    • revoke grants from tokenables
    • upsert grants for tokenables
  • Established a consistent, event-driven authorization workflow for tokenable grant changes, enabling auditability and external integration.
  • Added read-only application use cases for querying OAuth clients, scopes, and grants.
  • Introduced GetAllClientsUseCase to retrieve all OAuth clients or only active clients via the client repository.
  • Added GetAllActionsUseCase to retrieve all available Passport scope actions with optional cache bypass.
  • Added GetAllResourcesUseCase to retrieve all available Passport scope resources with optional cache bypass.
  • Added GetAllGrantsUseCase to retrieve all scope grants from the authorization store.
  • Added GetGrantsForTokenableUseCase to retrieve all scope grants assigned to a given grantable tokenable model.
  • Added GetGrantsForTokenableByTypeAndId to retrieve scope grants for tokenables when only type and identifier are available.
  • Established a consistent, use case–driven read model for authorization data, enabling UI layers and external consumers to query authorization state without accessing repositories directly.

Changed

  • Updated SaveOwnershipRelationUseCase to enforce stricter domain validation and ownership consistency.
  • Replaced generic argument validation with explicit domain exceptions for missing clients and owners.
  • Ensured that all existing scope grants of a previous owner are revoked when a client ownership changes.
  • Clarified ownership change semantics by making authorization cleanup an explicit part of the ownership transition process.

Fixed

  • Fixed wrong normalization on PassportScopeGrant::toScopeString incorrect scope strings like resource. instead of resource:.
1.1.0

Changed

  • Changed constructor property visibility from private to protected to allow safe inheritance and extension of core classes.
1.0.0

Added

  • Extracted all non-UI authorization and domain logic from Filament Passport UI into this dedicated core package.
  • Introduced a UI-agnostic, domain-oriented authorization layer built on top of Laravel Passport.
  • Added explicit Application / Usecase layer as the only supported integration surface.
  • Added structured scope modeling (resource + action) as a first-class domain concept.
  • Added reusable authorization context abstractions for inspection, auditing, and enforcement.
  • Added clear separation between domain, application, and infrastructure concerns.
  • Added configuration support for custom Passport models and domain integration.
  • Added comprehensive documentation covering architecture, configuration, usage, and use cases.
  • Established a stable foundation for multiple UI or integration layers to consume shared authorization logic.
Fixed
  • Fixed uniqueness constraint on the passport_scope_grants table by including context_client_id in the unique index.
    This prevents collisions when identical scope grants are assigned in different client contexts.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky