PHPackages                             stgbundle/cas-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. stgbundle/cas-bundle

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

stgbundle/cas-bundle
====================

Bundle de CAS para Symfony 7.4+

8.0.0(2mo ago)34.7k↓70.6%4[1 issues](https://github.com/deimsantafe/stg-cas-bundle/issues)[8 PRs](https://github.com/deimsantafe/stg-cas-bundle/pulls)MITPHPPHP &gt;=8.2CI passing

Since Jan 17Pushed 2w ago1 watchersCompare

[ Source](https://github.com/deimsantafe/stg-cas-bundle)[ Packagist](https://packagist.org/packages/stgbundle/cas-bundle)[ Docs](https://github.com/deimsantafe/stg-cas-bundle)[ RSS](/packages/stgbundle-cas-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (9)Versions (25)Used By (0)

Stg CAS Bundle
==============

[](#stg-cas-bundle)

Bundle de autenticación CAS (Central Authentication Service) para **Symfony 7.4** y **PHP 8.2+**.

---

Requisitos
----------

[](#requisitos)

ComponenteVersión mínimaPHP8.2Symfony7.4symfony/security-bundle7.4---

Instalación
===========

[](#instalación)

1). Instalación desde packagist.org:

composer require stgbundle/cas-bundle

Nota: Debe tener instalado previamente el SecurityBundle: composer require symfony/security-bundle

En el `config/bundles.php`, el `SecurityBundle` se debe cargar **antes** que `CasBundle`:

```
return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
    Symfony\Bundle\SecurityBundle\SecurityBundle::class   => ['all' => true],
    STG\DEIM\Security\Bundle\CasBundle\CasBundle::class  => ['all' => true],
    // ... otros bundles
];
```

2). Ajustar la configuración de seguridad — `config/packages/security.yaml`

```
security:
    providers:
        cas_users:
            entity:
                class: App\Entity\Usuario
                property: cuil

    firewalls:
        dev:
            pattern: ^/(_profiler|_wdt|assets|build|cas/proxy-callback)/
            security: false

        main:
            # lazy: false es obligatorio con CAS: el entry point debe dispararse
            # para requests anónimas sin esperar credenciales del usuario.
            lazy: false
            provider: cas_users
            cas:
                check_path: /cas/check      # Ruta donde CAS redirige con el ticket
                failure_path: /failure      # Ruta de error en caso de fallo
            entry_point: cas.authenticator.main
            logout:
                path: /secure/logout        # Ruta de logout de la aplicación

    access_control:
        - { path: ^/cas/check, roles: PUBLIC_ACCESS }
        - { path: ^/failure,   roles: PUBLIC_ACCESS }
        - { path: ^/,          roles: ROLE_USER }
```

Nota: entry\_point varía según cómo se llame el firewall ($firewallName) puede ser que sea secure, entonces se define entry\_point: cas.authenticator.secure

3). Configuración del bundle

Crear el archivo `config\packages\cas.yaml`:

```
cas:
    url: https://dsso.santafe.gov.ar/service-auth
    cert: false
    username_attribute: 'cuil'
    proxy: false
```

4). La aplicación necesita al menos estas tres rutas:

```
// src/Controller/DefaultController.php
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

class DefaultController
{
    #[Route('/failure', name: 'failure')]
    public function failure(Request $request): Response
    {
        return new Response(
            'Error al autenticar - Usuario: ' . $request->get('user')
        );
    }

    #[Route('/secure/logout', name: 'logout')]
    public function logout()
    {
    }

    #[Route('/cas/check', name: 'cas_check')]
    public function casCheck(): Response
    {
        // El CasAuthenticator intercepta esta ruta cuando CAS redirige con ?ticket=
        // Si se llega aquí sin ticket, redirigir al inicio.
        return new RedirectResponse('/');
    }
```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 79.2% 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 ~215 days

Total

15

Last Release

70d ago

Major Versions

3.2 → 5.02020-07-06

5.0 → 6.02022-02-08

6.2 → v7.2.x-dev2023-12-05

7.1 → 8.0.02026-04-24

PHP version history (6 changes)4.0PHP &gt;=5.5.9

3.2PHP &gt;=5.3.9

5.0PHP ^7.1.3

6.0PHP &gt;=7.2.5

v7.2.x-devPHP &gt;=8.1

8.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bec9aec345b0b3e5356d343797fafa40adcc165c9d37dbb9b02425f0711c584?d=identicon)[deimsantafe](/maintainers/deimsantafe)

---

Top Contributors

[![czonta](https://avatars.githubusercontent.com/u/34914755?v=4)](https://github.com/czonta "czonta (42 commits)")[![deimsantafe](https://avatars.githubusercontent.com/u/34039771?v=4)](https://github.com/deimsantafe "deimsantafe (6 commits)")[![mggodoy](https://avatars.githubusercontent.com/u/13136035?v=4)](https://github.com/mggodoy "mggodoy (3 commits)")[![brisabasco](https://avatars.githubusercontent.com/u/8051690?v=4)](https://github.com/brisabasco "brisabasco (2 commits)")

---

Tags

symfonyAuthenticationcasSTG

### Embed Badge

![Health badge](/badges/stgbundle-cas-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

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

8.5k5.9M738](/packages/sylius-sylius)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)[sulu/sulu

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

1.3k1.4M203](/packages/sulu-sulu)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)

PHPackages © 2026

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