HWIOAuthBundle have error on service definition

Discuss Symfony 2 bundles here

Moderators: dcobalt, tiagojsag

HWIOAuthBundle have error on service definition

Postby justin » Fri Jul 20, 2012 9:42 am

Hi all,

I am trying to work on HWIOAuthBundle(https://github.com/hwi/HWIOAuthBundle).

I get an error as
The service definition "my.oauth_aware.user_provider.service" does not exist.


In HWIOAuthBundle(https://github.com/hwi/HWIOAuthBundle/blob/be4a916fba81967ecc28c4634d255acc33e4157e/Resources/doc/3-configuring_the_security_layer.md#b-configure-the-oauth-firewall) documentation. It is given
Code: Select all
oauth_user_provider:
                    service: my.oauth_aware.user_provider.service


I follow the same code described in link.
What will be service provider here to work with facebook, twitter etc?

Code

In app/config/config.yml
Code: Select all
hwi_oauth:
    # configuration of oauth resource owners to use
    resource_owners:
        fb:
            type:                facebook
            client_id:           XXXXXXXXXX
            client_secret:      XXXXXXXXXXXXXXXXXXX
            scope:               ""

    # name of the firewall the oauth bundle is active in
    firewall_name: secured_area


In app/config/security.yml
Code: Select all
 
security:
    firewalls:
            oauth:
                resource_owners:
                    facebook:           "/login/check-facebook"
                    google:             "/login/check-google"
                    my_custom_provider: "/login/check-custom"
                    my_github:          "/login/check-github"
                login_path:        /login
                failure_path:      /login

                oauth_user_provider:
                    service: my.oauth_aware.user_provider.service
justin
Junior Member
 
Posts: 4
Joined: Tue Jun 26, 2012 6:11 am

Re: HWIOAuthBundle have error on service definition

Postby vpatil09 » Tue Aug 14, 2012 1:15 pm

define the service for this in services.yml
Code: Select all
services:
    my.oauth_aware.user_provider.service:
        class: HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider
        arguments:
            userManager: "@fos_user.user_manager"
            properties: ["pass properties as array"]
vpatil09
Junior Member
 
Posts: 1
Joined: Tue Aug 14, 2012 12:57 pm


Return to Bundles discussion

Who is online

Users browsing this forum: No registered users and 1 guest