FOSOAuthServerBundle の統合に問題があります...
oauth/v2/token にアクセスしようとしたり、コントローラーで新しいクライアントを作成しようとすると、次のエラーが発生します。
存在しないサービス「fos_oauth_server.controller.token」をリクエストしました
oauth/v2/auth によって fos ユーザーのログイン フォームにリダイレクトされるので、これで問題ないと思います。
私のsecurity.yml
プロバイダー: #my_fos_facebook_provider: #id: my.facebook.user
fos_userbundle: id: fos_user.user_managerfirewalls: 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
そしてここで私の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