0

I have some trouble integrate the FOSOAuthServerBundle...

When I try to access to oauth/v2/token or create a new client with a my controller I have this error :

You have requested a non-existent service \"fos_oauth_server.controller.token\

oauth/v2/auth redirects me to my fos user login form so I think this is OK..

My security.yml

providers: #my_fos_facebook_provider: #id: my.facebook.user
fos_userbundle: id: fos_user.user_manager

firewalls:
    api:
        pattern: ^/api/.*
        fos_oauth: true
        stateless: true
        anonymous: false


    oauth_token:
        pattern:    ^/oauth/v2/token
        security:   false


    # -> custom firewall for the admin area of the URL
    admin:
        pattern:      /admin(.*)
        form_login:
            provider:       fos_userbundle
            login_path:     /admin/login
            use_forward:    false
            check_path:     /admin/login_check
            failure_path:   null
        logout:
            path:           /admin/logout
        anonymous:    true
    # -> end custom configuration

    # defaut login area for standard users
    main:
        pattern:      .*
        form_login:
            provider:       fos_userbundle
            login_path:     fos_user_security_login
            use_forward:    false
            check_path:     fos_user_security_check
            default_target_path: /
            failure_path:   null
        logout:       true
        anonymous:    true

And here my config.yml..

fos_oauth_server:
    db_driver: orm       # Driver availables: orm, mongodb, or propel
    client_class:        Sportimimi\userBundle\Entity\Client
    access_token_class:  Sportimimi\userBundle\Entity\AccessToken
    refresh_token_class: Sportimimi\userBundle\Entity\RefreshToken
    auth_code_class:     Sportimimi\userBundle\Entity\AuthCode   
    service:
        user_provider: fos_user.user_manager
user3653664
  • 37
  • 10

0 Answers0