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
Simplesamlphp Test Framework

Simplesamlphp Test Framework Laravel Package

simplesamlphp/simplesamlphp-test-framework

Testing framework for SimpleSAMLphp to help validate authentication and SAML flows in automated test suites. Provides tooling and fixtures to simulate IdP/SP interactions, enabling reliable integration tests for applications using SimpleSAMLphp.

View on GitHub
Deep Wiki
Context7

Test framework for SimpleSAMLphp and related repositories

Frequently asked questions about Simplesamlphp Test Framework
Can I use this framework to test Laravel’s SAML/OIDC authentication flows with SimpleSAMLphp?
Yes, if your Laravel app acts as a Service Provider (SP) or client to SimpleSAMLphp. The framework simulates IdP/SP interactions, so you can validate SAML/OIDC redirects, token validation, and error handling in Laravel’s integration tests. Use it alongside Laravel’s HTTP tests to cover external auth flows.
How do I install this package in a Laravel project?
This isn’t a direct Laravel package—it requires SimpleSAMLphp installed separately (e.g., via Docker or server setup). Run `composer require simplesamlphp/simplesamlphp-test-framework` in your test environment, then configure it to interact with your Laravel app’s SAML/OIDC endpoints. It’s designed for external testing, not as a Laravel service provider.
Does this framework work with Laravel’s built-in testing tools like Pest or PHPUnit?
Absolutely. Use it alongside Laravel’s testing tools: leverage Pest/PHPUnit for internal logic and this framework for external SAML/OIDC flows. For example, test Laravel’s `/login/saml` route by mocking SimpleSAMLphp responses via the framework’s fixtures. It’s a complementary tool, not a replacement.
What Laravel versions and PHP versions does this framework support?
The framework itself supports PHP 7.4–8.2, but Laravel compatibility depends on your setup. Ensure your Laravel app’s PHP version aligns with SimpleSAMLphp’s requirements (e.g., Laravel 10 + PHP 8.2). Test SAML/OIDC libraries (like `onelogin/php-saml`) for protocol-level compatibility with SimpleSAMLphp’s test assertions.
Can I use this to test OIDC flows in Laravel, or is it SAML-only?
It supports both SAML and OIDC, as SimpleSAMLphp handles both protocols. You can simulate OIDC token exchanges, user info endpoints, and client credential flows in your Laravel tests. The framework’s fixtures include tools for mocking OIDC responses, making it versatile for modern auth stacks.
How do I set up test users or mock identities in SimpleSAMLphp for Laravel testing?
Use SimpleSAMLphp’s admin interface or CLI tools (e.g., `simplesamlphp:admin`) to create test users/groups. The framework provides fixtures to pre-populate data, but you may need to manually configure test identities in `config-auth.php` or via the web UI. For CI/CD, script these steps or use Docker volumes to persist test data.
Are there alternatives to this framework for testing SAML/OIDC in Laravel?
Yes. For lightweight testing, use Laravel’s `HttpTests` with mocked SAML responses (e.g., via `Mockery`). For OIDC, libraries like `league/oauth2-server` include test helpers. However, this framework is specialized for SimpleSAMLphp’s ecosystem, offering deeper SAML/OIDC protocol validation and compliance testing (e.g., GDPR, SSO standards).
Can I run this framework in my Laravel CI pipeline (e.g., GitHub Actions)?
Yes, but it requires SimpleSAMLphp to be available in your CI environment. Use Docker containers (e.g., `simplesaml/simplesamlphp`) in your GitHub Actions workflow. Trigger the framework’s tests as a separate job after Laravel’s tests pass, focusing on end-to-end SAML/OIDC validation between Laravel and SimpleSAMLphp.
Will this framework work if SimpleSAMLphp is hosted on a separate server?
Yes, the framework is designed for external testing. Configure your Laravel app to point to the remote SimpleSAMLphp instance (e.g., via SP metadata), then use the framework to simulate interactions. This is ideal for production-like testing where SimpleSAMLphp isn’t co-located with Laravel.
How do I test error scenarios like invalid SAML assertions or expired tokens?
The framework includes tools to generate malformed SAML/OIDC responses (e.g., expired tokens, invalid signatures). In your Laravel tests, assert that your app handles these errors gracefully (e.g., redirects to login, displays user-friendly messages). Combine this with Laravel’s exception testing to validate full error flows.
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.
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
spatie/mailcoach-vapor