Skip to content

A bundle for Laravel, providing authentication against eCas, the Central Authentication Service server of European Commission.

License

Notifications You must be signed in to change notification settings

ecphp/laravel-ecas

Laravel eCas Bundle

An ECAS bundle for Laravel.

Installation

    composer require ecphp/laravel-ecas

config/app.php

    'providers'       => [
        ...
        EcPhp\LaravelEcas\Providers\LaravelEcasProvider::class,
    ],

app/Providers/AppServiceProvider.php

    <?php

    declare(strict_types=1);

    use Illuminate\Contracts\Foundation\Application;
    use loophp\psr17\Psr17Interface;
    use Nyholm\Psr7\Factory\Psr17Factory;
    use loophp\psr17\Psr17;

    public function register(): void
    {

        $this->app->bind(
            Psr17Interface::class,
            function(Application $app): Psr17Interface {
                $psr17Factory = new Psr17Factory();

                //or whatever psr17 you want
                return new Psr17(
                    $psr17Factory,
                    $psr17Factory,
                    $psr17Factory,
                    $psr17Factory,
                    $psr17Factory,
                    $psr17Factory
                );
            }
        );
    }

About

A bundle for Laravel, providing authentication against eCas, the Central Authentication Service server of European Commission.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •