# symfony/security-guard

Symfony Security Component - Guard

Repository: https://github.com/symfony/security-guard
Canonical: https://ross.abutalabs.com/products/security-guard
Homepage: https://symfony.com/security
Language: PHP
License: MIT
License Family: permissive
Topics: symfony, php, component, symfony-component
Archived: true
Last push: 2024-10-27T12:57:05+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3996, "days_push": 675, "days_rel": 675, "gap_med": null, "n_releases_24m": 1}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1410, forks 10 (observed 2026-08-28T04:04:38.814770+00:00)

## What it is
The Symfony Security Guard component, part of the Symfony framework, lets developers build custom multi-step authentication systems with full control over the authentication flow. It unifies different authentication mechanisms behind a single GuardAuthenticator interface.

## Use cases
- implement custom login authentication in a Symfony app
- build token-based API authentication for a PHP backend
- combine multiple authentication methods behind one firewall
- create JSON login endpoints for a SPA frontend
- write authenticators for LDAP or API-key based login

## When to choose
- you are on a Symfony 5.x/6.x app needing custom authentication logic
- you need fine-grained control over the authentication process in PHP
- you want to integrate several auth mechanisms into one Symfony firewall

## When to avoid
- you are on Symfony 6.4+ or newer, where Guard was replaced by the modern Authenticator-based security system
- you are not using the Symfony framework
- you only need simple form login handled by Symfony's built-in authenticators

## Facets
- artifact type: library
- maturity: maintenance
- function: auth, middleware, security
- domain: web-development, backend, security, apis
- platform: php
- tags: symfony-component, authentication, guard-authenticator, firewalls, web-server

## Member repositories
- symfony/security-guard (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:38.814770+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:38:30.146200+00:00, confidence not recorded.
  - readme: https://github.com/symfony/security-guard (fetched 2026-08-28T04:04:38.814770+00:00, sha 69ca9e7d5c1c)
  - homepage: https://symfony.com/security (fetched 2026-08-29T11:51:49.856902+00:00, sha d1e586ae8fb2)
  - site_page: https://symfony.com/doc (fetched 2026-08-29T11:51:49.866271+00:00, sha 44889134f4fb)
  - site_page: https://symfony.com/releases (fetched 2026-08-29T11:51:49.868298+00:00, sha 429432437be6)
  - site_page: https://symfony.com/blog/category/releases (fetched 2026-08-29T11:51:49.870775+00:00, sha f38db6c86da8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
