Code Monkey home page Code Monkey logo

jwt-bundle's Introduction

jwt-bundle

Helper for lcobucci/jwt.

Instalation

Require the library with composer:

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.

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.

jwt-bundle's People

Contributors

johanderuijter avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.