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
Phpcas Guard Bundle

Phpcas Guard Bundle Laravel Package

alexandret/phpcas-guard-bundle

View on GitHub
Deep Wiki
Context7

PhpCas Bundle using guard authentication for symfony 3.4, 4.4 and 5.0

Frequently asked questions about Phpcas Guard Bundle
Can I use alexandret/phpcas-guard-bundle directly in Laravel without Symfony?
No, this bundle is designed for Symfony 3.4+ and relies on Symfony’s Security Guard, DependencyInjection, and event systems. You’ll need to create Laravel-compatible adapters (e.g., middleware, service providers) to bridge the gap, or use the underlying jasig/phpcas library directly.
What Laravel versions does this package support?
The package itself doesn’t support Laravel natively, but you can integrate it with Laravel 8+ by leveraging Symfony components like `symfony/http-foundation` for compatibility. Test thoroughly, as Laravel’s service container and auth system differ from Symfony’s.
How do I configure CAS server settings in Laravel?
Since the bundle uses Symfony’s YAML config, you’ll need to map settings to Laravel’s `.env` or `config/cas.php`. Example: Set `CAS_HOSTNAME` in `.env` and create a Laravel service to pass these values to jasig/phpcas or a custom authenticator.
Does this package support CAS 3.0 or only older versions?
Yes, it supports CAS 1.0, 2.0, and 3.0 via jasig/phpcas, which is the underlying library. The bundle itself doesn’t add protocol-specific limitations, so all versions are compatible if your CAS server supports them.
Is there a simpler Laravel-native alternative to this bundle?
Yes, consider `spatie/laravel-cas`, which is designed specifically for Laravel and avoids Symfony dependencies. It’s more maintainable and easier to integrate, though it may lack some advanced Guard features.
How do I handle CAS authentication routes in Laravel?
You’ll need to manually define routes for `/cas/login`, `/cas/validate`, etc., in Laravel’s `routes/web.php`. Use middleware to delegate CAS logic to a service wrapping jasig/phpcas or a custom Guard-like authenticator.
Will this bundle work with Laravel’s built-in auth system?
Indirectly, yes. You’ll need to create a custom UserProvider or extend Laravel’s `AuthenticatesUsers` trait to integrate with the bundle’s authenticator. The bundle’s Guard logic won’t map directly, so abstraction is required.
Is this package actively maintained? Should I use it for production?
No, the last release was in 2020, and it’s abandoned. For production, fork the package or use a Laravel-native CAS solution like `spatie/laravel-cas`. Monitor for community forks or consider Symfony’s native Guard if CAS is critical.
How do I test CAS authentication in Laravel with this bundle?
Isolate CAS logic in a testable service layer using jasig/phpcas directly. Mock the CAS server responses (e.g., with VCR or HTTP client stubs) and test your Laravel middleware or authenticator class in isolation.
What are the performance implications of using CAS with this bundle?
CAS adds overhead due to token validation rounds-trips to the CAS server. For high-traffic apps, cache validated tokens or consider lighter-weight alternatives like OAuth2 (Laravel Passport) or SAML. Benchmark under load.
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