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

Keycloak Bearer Only Adapter Bundle Laravel Package

abel/keycloak-bearer-only-adapter-bundle

Symfony bundle to secure APIs with Keycloak Bearer-Only clients. Provides adapter and configuration (issuer, realm, client id/secret) via Symfony Flex recipe or manual YAML/.env setup. Supports Keycloak distribution differences (e.g., /auth removal).

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API Security Roadmap: Accelerates adoption of Bearer Token authentication for API-first products, reducing reliance on session-based auth (e.g., OAuth2 with PKCE) for machine-to-machine (M2M) or server-to-server (S2S) integrations.
  • Build vs. Buy: Eliminates the need to build custom Keycloak adapters from scratch, saving 3–6 months of dev effort for teams already using Keycloak. Ideal for startups or enterprises with tight security deadlines.
  • Multi-Tenant SaaS: Enables tenant-isolated API access via Keycloak realms/clients, simplifying compliance (e.g., GDPR, HIPAA) for shared infrastructure.
  • Microservices Adoption: Streamlines service-to-service auth in Laravel/Symfony microservices by standardizing bearer token validation across teams.
  • Legacy System Modernization: Bridges older PHP/Laravel monoliths to modern OAuth2/Bearer flows without full rewrite, reducing technical debt.

When to Consider This Package

  • Avoid if:

    • Your API requires interactive user flows (e.g., OAuth2 Authorization Code with PKCE)—this bundle is bearer-only (no user sessions).
    • You need advanced Keycloak features like user info endpoints or token introspection (consider keycloak-php instead).
    • Your team lacks Symfony/Laravel familiarity—this is a Symfony bundle (though Laravel can integrate via Symfony’s HTTP kernel).
    • You’re using non-Keycloak OAuth2 providers (e.g., Auth0, Okta)—opt for provider-specific adapters.
    • Your security needs custom token validation logic (e.g., JWT claims parsing)—this bundle delegates to Keycloak’s built-in validation.
  • Consider if:

    • You’re building APIs for internal tools, IoT, or backend services where user context isn’t needed.
    • Keycloak is already your centralized IAM, and you want to reduce auth boilerplate in PHP.
    • Your team uses Symfony or Laravel and needs a low-maintenance solution (MIT-licensed, last updated 2023).
    • You’re migrating from basic auth or API keys to OAuth2 Bearer tokens for scalability.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us secure our APIs with Keycloak in weeks, not months—cutting dev costs by reusing open-source infrastructure. By standardizing bearer tokens for machine-to-machine auth, we’ll reduce fraud risk, simplify compliance audits, and enable faster integrations with partners. Think of it as ‘turnkey OAuth2’ for our Laravel/Symfony APIs, with zero lock-in since it’s MIT-licensed."

Ask: "Should we prioritize this for [API project X] to hit our [security/compliance] goals by [date]?"


For Engineering:

*"This Symfony bundle plugs Keycloak’s bearer-only auth into your API with minimal setup:

  • No custom token validation: Leverages Keycloak’s built-in issuer/realm/client checks.
  • Symfony Flex recipe: Auto-configures in 1 command (composer require + env vars).
  • Laravel-friendly: Can be wrapped in a Laravel service provider for cross-framework teams.
  • Lightweight: ~400 LOC, no external dependencies beyond Keycloak.

Tradeoffs:

  • Not for user-facing flows (use keycloak-php instead).
  • Requires Keycloak setup (but we can containerize it via Docker).

Proposal: Use this for:

  1. Internal tooling APIs (e.g., CI/CD, monitoring).
  2. Partner integrations needing token-based auth.
  3. Replacing API keys in high-risk services.

Next steps:

  1. Spin up Keycloak locally (Docker image provided).
  2. Configure a ‘bearer-only’ client in Keycloak.
  3. Drop this bundle into config/packages/ and validate tokens in 10 minutes."*

Ask: "Can we allocate [X] hours to test this in [staging environment] by [date]?"

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.
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium