kayue / KayueWordpressBundle

A Symfony 2 bundle for providing WordPress repositories and authenticating users (login).
101 stars 43 forks source link

securety.yml #70

Closed dbpatty closed 8 years ago

dbpatty commented 8 years ago

Hi, i have installed KayueWordpressBundle with no errors but I don't understand how set up cross autetication between wp e sf2, my security.yml is like this: ... providers: admin: entity: { class: PromotionclubUserBundle:User} user: entity: { class: PromotionclubUserBundle:User}

Add the WordPress user provider

    wordpress:
        entity: { class: Kayue\WordpressBundle\Entity\User, property: username }
firewalls:
    login:
        pattern:  ^/wp/secured/login$
        security: false
    secured_area:
        pattern:    ^/wp/secured/
        # Add the WordPress firewall. Allow you to read WordPress's login state in Symfony app.
        kayue_wordpress: ~
        # Optional. Symfony's default form login works for WordPress user too.
        form_login:
             check_path: /wp/secured/login_check
             login_path: /wp/secured/login
             default_target_path: /
        # Optional. Use this to logout.
        logout:
            path:   /wp/secured/logout
            target: /wp/secured/login 
    dev:
        pattern:  ^/(_(profiler|wdt)|css|images|js)/
        security: false

    admin_secured_area:
        pattern:    ^/admin
        anonymous: ~
        context: primary_auth
        form_login:
            login_path: admin_login
            check_path: admin_login_check
            always_use_default_target_path: true
            default_target_path: /admin/home
            csrf_provider: form.csrf_provider
        http_basic:
            realm: "Secured Admin Area"
        logout:
            path: admin_logout
            target: admin_login
            invalidate_session: true

    users_secured_area:
        pattern:    ^/ 

... If I try to load [url site]/wp/secured/login I have fatal error My wp installation url in [url site]/forum

Do you explain to me where is the error in my config file? Many thank's Best regards

dbpatty

kayue commented 8 years ago

what fatal error did you got?

kayue commented 8 years ago

btw this bundle doesn't support wp4 yet...

dbpatty commented 8 years ago

..ok thank's