2017 © Pedro Peláez
 

symfony-bundle jwt-bundle

Helper for lcobucci/jwt

image

jdr/jwt-bundle

Helper for lcobucci/jwt

  • Saturday, December 9, 2017
  • by jdr
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

jwt-bundle

Helper for lcobucci/jwt., (*1)

Instalation

Require the library with composer:, (*2)

composer require jdr/jwt-bundle

Configuration

Below you can find an example configuration. The default configuration is optional, provided more specific ones are provided. When both the default and specific keys are set, the default keys are discarded for that option., (*3)

jdr_jwt:
    signers:
        ES256: JDR\JWS\ECDSA\ES256 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        ES384: JDR\JWS\ECDSA\ES384 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        ES512: JDR\JWS\ECDSA\ES512 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        RS256: Lcobucci\JWT\Signer\Rsa\Sha256 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        RS384: Lcobucci\JWT\Signer\Rsa\Sha384 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        RS512: Lcobucci\JWT\Signer\Rsa\Sha512 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        HS256: Lcobucci\JWT\Signer\Hmac\Sha256 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        HS384: Lcobucci\JWT\Signer\Hmac\Sha384 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
        HS512: Lcobucci\JWT\Signer\Hmac\Sha512 # [Default] Can be omitted. Provided as an option only to allow signers to be overridden.
    default:
        algorithm: ~ # Algorithm to use with default key.
        private_key: ~ # Path to the default private key.
        passphrase: ~ # Passphrase for the default private key.
        public_key: ~ # Path to the default public key.
        options:
            issuer: ~ # [Optional] Default issuer. Will be used to set the 'iss' claim.
            lifetime: ~ # [Optional] Default lifetime in seconds. Will be used to set the 'exp' claim.
    keys:
        some_purpose: # This key will be used to identify the created token builders and parsers.
            algorithm: ~ # Algorithm to use with specific key.
            private_key: ~ # Path to the specific private key.
            passphrase: ~ # Passphrase for the specific private key.
            public_key: ~ # Path to the specific public key.
            options:
                issuer: ~ # [Optional] Default issuer. Will be used to set the 'iss' claim.
                lifetime: ~ # [Optional] Default lifetime in seconds. Will be used to set the 'exp' claim.

License

The MIT License (MIT). Please see License File for more information., (*4)

The Versions