jtangas/auth-bundle

symfony authorization bundle utilizing FOSUserBundle, JWT, and necessary tools for a JWT Based Rest Environment

0.6 2017-12-21 00:37 UTC

This package is auto-updated.

Last update: 2024-04-23 09:25:46 UTC


README

Install the package with composer

composer require jtangas/auth-bundle

Add LexikJWT, FOSUserBundle, and this bundle to app/AppKernel.php

$bundles = [
    ...
    new Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle(),
    new Jtangas\AuthBundle\JtangasAuthBundle(),
    new FOS\UserBundle\FOSUserBundle(),
];

Follow prompts to generate default values for Lexik JWT

Values

parameterdefault valuedescription
jwt_private_key_path'%kernel.project_dir%/var/jwt/private.pem'The default location of where the package will build the private pem file for JWT.
jwt_public_key_path'%kernel.prject_dir%/var/jwt/public.pem'The default location of where the package will build the public pem file for JWT.
jwt_key_pass_phrasenullThe password the user must provide to secure the private key file
jwt_token_ttlnulldeprecated
jwt_token_ttl_adminnullSets token TTL for admin level users with FOS User Roles
jwt_token_ttl_usernullSets token TTL for user level users with FOS User Roles
user_identity_fieldusernameDefines what field in the database will be used as the users login name
user_classnullDefines your user class that will be implementing the FOS User class
extra_debugfalsedeprecated