Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument 1 passed to Lcobucci\JWT\Builder::sign() #814

Closed
PlamenPanayotov opened this issue Dec 19, 2020 · 1 comment · Fixed by #815
Closed

Argument 1 passed to Lcobucci\JWT\Builder::sign() #814

PlamenPanayotov opened this issue Dec 19, 2020 · 1 comment · Fixed by #815

Comments

@PlamenPanayotov
Copy link

Hello, I have a issue using the lexik/jwt-authentication-bundle v2.10.4, the message is "Argument 1 passed to Lcobucci\JWT\Builder::sign() must implement interface Lcobucci\JWT\Signer, instance of Lcobucci\JWT\Signer\Key given, called in /home/plamen/Projects/test/vendor/lexik/jwt-authentication-bundle/Services/JWSProvider/LcobucciJWSProvider.php on line 223", I believe that something is wrong with the LcobucciJWSProvider classs.

security.yaml

# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
    # used to reload user from session & other features (e.g. switch_user)
    app_user_provider:
        entity:
            class: App\Entity\User
            property: email
firewalls:

    login:
        pattern:  ^/api/login
        stateless: true
        anonymous: true
        json_login:
            check_path:               /api/login_check
            success_handler:          lexik_jwt_authentication.handler.authentication_success
            failure_handler:          lexik_jwt_authentication.handler.authentication_failure

    api:
        pattern:   ^/api
        stateless: true
        guard:
            authenticators:
                - lexik_jwt_authentication.jwt_token_authenticator

access_control:
    - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/api,       roles: IS_AUTHENTICATED_FULLY }
@chalasr
Copy link
Collaborator

chalasr commented Dec 19, 2020

Fixed in v2.10.5, thank you very much for the report @PlamenPanayotov.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants