ns/token-bundle

This bundle provides a JWT token integration with symfony

Installs: 9 137

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

4.0.2 2022-10-08 06:11 UTC

README

  composer require ns/token-bundle

Edit AppKernel.php and add the bundle

    new NS\TokenBundle\NSTokenBundle(),

Edit app/config/config.yml

    ns_token:
        generator:
            id: <some random string>
            key: <another random string>
            issuer: <string (often the site source)>
            short_expiration: 3600
            long_expiration: 2592000
            signer: Lcobucci\JWT\Signer\Rsa\Sha256 #default

You can use your own signer by implementing the Lcobucci\JWT\Signer interface.