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

wordpress Authentication #26

Open
ahmed-hamdy90 opened this issue Dec 23, 2013 · 3 comments
Open

wordpress Authentication #26

ahmed-hamdy90 opened this issue Dec 23, 2013 · 3 comments

Comments

@ahmed-hamdy90
Copy link

i had integrate my project with fosUserBundle before i use KayueWordpressBundle

my Security.yml file is:

security:
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext
        FOS\UserBundle\Model\UserInterface: sha512
        Kayue\WordpressBundle\Entity\User:
            id: kayue_wordpress.security.encoder.phpass

    role_hierarchy:
        ROLE_SUPER_ADMIN: ROLE_SUPER_ADMIN
        ROLE_CUSTOMER: ROLE_CUSTOMER
        ROLE_SERVICE_PROVIDER: ROLE_SERVICE_PROVIDER

    providers:
        in_memory:
            memory:
                users:
                    user:  { password: userpass, roles: [ 'ROLE_USER' ] }
                    admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }      
        fos_userbundle:
            id: fos_user.user_provider.username
        wordpress:
            entity: { class: Kayue\WordpressBundle\Entity\User, property: username }
    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        login:
            pattern:  ^/demo/secured/login$
            security: false

        main:
            remember_me:
                key:  "%secret%"
                lifetime: 31536000 
                path:    /
                domain:   ~                                 
            pattern: ^/
            kayue_wordpress: ~
            form_login:
                remember_me: true
                provider: fos_userbundle
                csrf_provider: form.csrf_provider
            logout:
                target: /login
            anonymous:    true

    access_control:
        #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
        - { path: ^/$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/home/service-provider, role: ROLE_SERVICE_PROVIDER }
        - { path: ^/home/customer, role: ROLE_CUSTOMER }
        - { path: ^/home/admin, role: ROLE_SUPER_ADMIN } 
        - { path: ^/main/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/main/connect, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/main, roles: ROLE_USER }
    acl:
        connection: default

when i try to open Login page , this Exception will happen

FatalErrorException: Error: Call to undefined method Kayue\WordpressBundle\Security\Firewall\WordpressListener::setRememberMeServices() in /var/www/profile_tree/app/cache/dev/appDevDebugProjectContainer.php line 1818 

IS There any way to use KayueWordpressBundle with fosUserBundle

@kayue
Copy link
Owner

kayue commented Dec 23, 2013

@ahmed-hamdy90 I am using it with FOSUserBundle.

May I have a full log? I think this is a bug and I want to know where triggered it.

Thanks.

@kayue
Copy link
Owner

kayue commented Dec 23, 2013

@ahmed-hamdy90 oh wait I'm not using FOSUserBundle.

BTW I am not using RememberMeServices in anywhere, dunno what triggered it.

@kayue
Copy link
Owner

kayue commented Dec 23, 2013

Maybe try to remove remember_me: true from your config.

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

No branches or pull requests

2 participants