Code Monkey home page Code Monkey logo

gfreeaugetjwtbundle's People

Contributors

digitalkaoz avatar evkoh avatar gamringer avatar gfreeau avatar guilhermeblanco avatar ifdattic avatar litpuvn avatar lsv avatar magarzon avatar stloyd avatar strackovski avatar taluu avatar teohhanhui avatar thomasglachant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gfreeaugetjwtbundle's Issues

Symfony 2.8 upgrade breaks this bundle

Error:

[Symfony\Component\Debug\Exception\ContextErrorException]
  Catchable Fatal Error: Argument 2 passed to Symfony\Component\Security\Core\Authentication\Provider\DaoAuthenticationProvider::__construct() must be an instance of Symfony\Component\Security\Core\User\UserCheckerInterface, string given, called in /run/shm/user/cache/dev/appDevDebugProjectContainer.php on line 10854 and defined

404 error on dev environment

Hi ,
After install and configure this bundle i get 404 on routes prefix with index_dev.php for example:
midomain.dev//index_dev.php/v1/login.
Regards.

SF 2.8 Deprecation : The configuration tree has no root node.

On file DependencyInjecttion/Configuration.php, the new way to return the $treeBuilder introduces a breakdown compatibility with Symfony 2.8. (Error message : "The configuration tree has no root node'").
I know this version is not maintained anymore by Symfony but, well, still use it ;-/

Symfony 3.0 composer compatibility

So, it seems composer won't let you install this bundle if your Symfony application is based on Symfony 3.0 since this bundle requires Symfony up to v2.8.4. Could you update to fix?

Version Tag

The bundle seems stable, would it be possible to tag it for you?

Symfony 3.0 compatibility

Hi, i'm trying to upgrade my project to symfony 3.0.
I've got the following deprecated warning :

Using paths to find deeper items in Symfony\Component\HttpFoundation\ParameterBag::get is deprecated since version 2.8 and will be removed in 3.0. Filter the returned value in your own code instead:

Calls to the get() function on ParameterBag can not be deep anymore.

Any suggestions to remove this deprecated call or maybe this is a pending changes ?

SF 5 - ListenerInterface is deprecated

The "Gfreeau\Bundle\GetJWTBundle\Security\Firewall\GetJWTListener" class implements "Symfony\Component\Security\Http\Firewall\ListenerInterface" that is deprecated since Symfony 4.3, turn listeners into callables instead.

The class itself is quite easy to make - should be 2 classes, 1 for failure and 1 for success.

But the configuration

https://github.com/gfreeau/GfreeauGetJWTBundle/blob/master/DependencyInjection/Security/Factory/GetJWTFactory.php

I really not sure about

Support for S5?

I cannot install the library because of the requirements of the composer.json are not compatibles with the yours. Is this library abandoned or is going to be upgraded?

Composer install fails with lexik/jwt-authentication-bundle 1.1

Hi I'm getting this error when installing with lexik/jwt-authentication-bundle 1.1:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - gfreeau/get-jwt-bundle 1.0.1 requires lexik/jwt-authentication-bundle 1.0.*@dev -> no matching package found.
    - gfreeau/get-jwt-bundle 1.0.0 requires lexik/jwt-authentication-bundle 1.0.*@dev -> no matching package found.
    - Installation request for gfreeau/get-jwt-bundle ~1.0 -> satisfiable by gfreeau/get-jwt-bundle[1.0.0, 1.0.1].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Thanks
Rob

SF 5 - GetJWTListener should extend AbstractListener

Calling the "Gfreeau\Bundle\GetJWTBundle\Security\Firewall\GetJWTListener::handle()" method from the firewall is deprecated since Symfony 4.3, extend "Symfony\Bundle\SecurityBundle\Debug\AbstractListener" instead.

Might properly change when #34 is fixed?

Token

Hi.

First, I just want to say great project, just what I was looking for.

I'm a Symfony noob, and been fiddling around with your bundle, trying to authenticate through an Angular frontend, and so far I've managed to get the token just fine.

The problem starts when I'm trying to access other methods than the getToken one (I renamed it to authenticate). I'm getting a 401 status, and my symfony security log gives me this error: "A Token was not found in the SecurityContext".

I've Googled around, and see that this is an error not in direct relation to your lib. But I'm not sure if I've missed some basic Symfony setup, or if it's my integration of your lib that gives me the error. Or my implementation of the Userinterface for that matter. My setup did work with a basic form_login with a database, though. All I did after that is changing my firewall settings.

You wouldn't have any leads for me as for what could be wrong, or what I should check?

Here's my security.yml for reference:

security:
    encoders:
        App\UserBundle\Entity\User:
            algorithm: bcrypt
            cost: 15

    role_hierarchy:
        ROLE_ADMIN: ROLE_USER
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        database:
            entity: { class: AppUserBundle:User, property: email }

    firewalls:
        gettoken:
            pattern:  ^/v1/users/authenticate$
            provider: database
            stateless: true
            gfreeau_get_jwt:
                username_parameter: email
                password_parameter: password
                post_only: true
                success_handler: lexik_jwt_authentication.handler.authentication_success
                failure_handler: lexik_jwt_authentication.handler.authentication_failure

        api:
            pattern:   ^/
            stateless: true
            lexik_jwt:
                authorization_header: 
                    enabled: true
                    prefix:  Bearer
                query_parameter:    
                    enabled: true
                    name:    bearer
                throw_exceptions: false     
                create_entry_point: true    

Functional test

Hello,
first, thanks for this great bundle.
I'm working on an api and i need to write functional test, but it's not working:

when i do:

POST http://localhost:8000/web/app_dev.php/api/getToken
Content-Type: application/json
{"username":"username","password":"password"}

from a browser, authentication works.
But when i do in functional test:

$data = array('username' => 'username', 'password' => 'password');
$headers = array('Content-Type' => 'application/json');
$content = json_encode($data);
$client = static::createClient();
$client->request('POST', '/api/getToken', array(), array(), $headers, $content);
$reponse = $client->getResponse();
$this->assertSame(Response::HTTP_OK, $response->getStatusCode());

i got Bad credential.

Is that a known issue? Any idea? (if you need my conf file, tell me)

Thanks for any help

Tests :)

Should properly add some tests, so tags wouldnt be created with errors

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.