PHPackages                             peekabooauth/peekaboo-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. peekabooauth/peekaboo-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

peekabooauth/peekaboo-bundle
============================

Peekaboo Bundle

1.8.1(2mo ago)114.8k↓15.6%1GPL-3.0-onlyPHPPHP &gt;=8.4CI passing

Since Jun 23Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/peekabooauth/peekaboo-bundle)[ Packagist](https://packagist.org/packages/peekabooauth/peekaboo-bundle)[ RSS](/packages/peekabooauth-peekaboo-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (26)Versions (52)Used By (1)

Peekaboo Bundle
===============

[](#peekaboo-bundle)

Symfony bundle for authentication integration with the Peekaboo identity server.

Requirements
------------

[](#requirements)

- PHP 8.4+
- Symfony 7.4+ or 8.0+

Install
-------

[](#install)

```
composer require peekabooauth/peekaboo-bundle
```

Add to `config/bundles.php`

```
Peekabooauth\PeekabooBundle\PeekabooBundle::class => ['all' => true]
```

Add to `config/routes/annotations.yaml`

```
peekaboo:
    resource: '@PeekabooBundle/Resources/config/routes.yaml'
```

Add to `config/packages/security.yaml`

```
#......
providers:
    peekaboo_user_provider:
        id: Peekabooauth\PeekabooBundle\UserProvider\UserProvider
#......
firewalls:
    peekaboo:
        pattern: ^/
        custom_authenticators:
            - Peekabooauth\PeekabooBundle\Security\PeekabooAuthenticator
        provider: peekaboo_user_provider
#.......
access_control:
    - { path: ^/peekaboo/auth, roles: PUBLIC_ACCESS }
```

Authentication Methods
----------------------

[](#authentication-methods)

The bundle supports multiple authentication methods, checked in priority order:

PriorityMethodHow to use1JWT Token`Authorization: Bearer ` header, or `bearer` query/body parameter2API Key`x-api-key` header, or `apikey` query/body parameter3Basic Auth`Authorization: Basic ` header4SessionAutomatic after OAuth redirect flow### JWT Token Authentication

[](#jwt-token-authentication)

```
# Via Authorization header
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." https://app.example.com/api/endpoint

# Via query parameter
curl "https://app.example.com/api/endpoint?bearer=eyJhbGciOiJIUzI1NiIs..."
```

### API Key Authentication

[](#api-key-authentication)

```
# Via x-api-key header
curl -H "x-api-key: your-api-key" https://app.example.com/api/endpoint

# Via query parameter
curl "https://app.example.com/api/endpoint?apikey=your-api-key"
```

### Basic Auth

[](#basic-auth)

```
curl -u "username:password" https://app.example.com/api/endpoint
```

### Getting a JWT Token

[](#getting-a-jwt-token)

```
curl -X POST -H "Content-Type: application/json" \
    https://peekabooauth.com/api/login_check \
    -d '{"username":"user@example.com","password":"123456"}'
```

Environment Variables
---------------------

[](#environment-variables)

VariableDescriptionDefault`IDENTITY_SERVER_URL_EXTERNAL`Public URL of identity server (for browser redirects)`https://peekabooauth.com``IDENTITY_SERVER_URL_INTERNAL`Internal URL of identity server (for server-to-server calls)`https://peekabooauth.com``IDENTITY_SERVER_AUTH_PATH`Path to authentication endpoint`/identity/auth``IDENTITY_SERVER_LOGOUT_PATH`Path to logout endpoint`/identity/logout``ROUTE_AFTER_REDIRECT`Route name to redirect after successful auth`homepage``PEEKABOO_APPLICATION_NAME`Your application name registered with Peekaboo`dev``PEEKABOO_APPLICATION_SECRET`Your application secret(required)`PEEKABOO_AUTOLOGIN`Auto-login provider (see below)(empty)`PEEKABOO_DEV_ROLES`Override dev user roles (comma-separated)(empty = default roles)Example `.env`:

```
IDENTITY_SERVER_URL_EXTERNAL=https://peekabooauth.com
IDENTITY_SERVER_URL_INTERNAL=https://peekabooauth.com
IDENTITY_SERVER_AUTH_PATH=/identity/auth
IDENTITY_SERVER_LOGOUT_PATH=/identity/logout
ROUTE_AFTER_REDIRECT=homepage
PEEKABOO_APPLICATION_NAME=myapp
PEEKABOO_APPLICATION_SECRET=your-secret-key
PEEKABOO_AUTOLOGIN=
```

Local Development
-----------------

[](#local-development)

To test your app without connecting to the real identity server (useful for offline development), set:

```
IDENTITY_SERVER_URL_INTERNAL=https://peekabooauth.dev
```

This returns a hardcoded dev user with the following properties:

- Email: `admin@localhost.net`
- Name: `dev`
- Roles: `ROLE_ADMIN`, `ROLE_USER`, `ROLE_API`, `ROLE_DEV`

To test with different roles, set `PEEKABOO_DEV_ROLES` in `.env.local`:

```
# Test as a specific role
PEEKABOO_DEV_ROLES=ROLE_QA

# Test with multiple roles
PEEKABOO_DEV_ROLES=ROLE_QA,ROLE_USER

# Back to default (all dev roles) — remove the line or leave empty
PEEKABOO_DEV_ROLES=
```

Autologin
---------

[](#autologin)

Set `PEEKABOO_AUTOLOGIN` to skip the login form and authenticate automatically:

ValueBehavior`google`Redirect directly to Google login`facebook`Redirect directly to Facebook login`google_js`Show login page, auto-click Google button`facebook_js`Show login page, auto-click Facebook button(empty)Show login form without autologinDevelopment
-----------

[](#development)

```
# Install dependencies
composer install

# Run tests
composer test

# Run static analysis
composer analyze
```

License
-------

[](#license)

GPL-3.0-only

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 76% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~14 days

Total

50

Last Release

73d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

1.5.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/df3e7060fb5777768e7bb133e98b1e7dfcc788f25fe6dc445acf7036da5c0c3e?d=identicon)[luchaninov](/maintainers/luchaninov)

---

Top Contributors

[![luchaninov](https://avatars.githubusercontent.com/u/3829796?v=4)](https://github.com/luchaninov "luchaninov (38 commits)")[![walera916](https://avatars.githubusercontent.com/u/20421019?v=4)](https://github.com/walera916 "walera916 (8 commits)")[![serhiiden](https://avatars.githubusercontent.com/u/114928078?v=4)](https://github.com/serhiiden "serhiiden (3 commits)")[![andriyleshko](https://avatars.githubusercontent.com/u/1693543?v=4)](https://github.com/andriyleshko "andriyleshko (1 commits)")

---

Tags

apisymfonybundleauthoauthpeekabooauthpeekaboo

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/peekabooauth-peekaboo-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/peekabooauth-peekaboo-bundle/health.svg)](https://phpackages.com/packages/peekabooauth-peekaboo-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
