diff --git a/Resources/doc/1-setting_up_the_bundle.md b/Resources/doc/1-setting_up_the_bundle.md index 579108f4e..292118bf4 100644 --- a/Resources/doc/1-setting_up_the_bundle.md +++ b/Resources/doc/1-setting_up_the_bundle.md @@ -35,10 +35,13 @@ Import the `redirect.xml` routing file in your own routing file. # app/config/routing.yml hwi_oauth_redirect: resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml" - prefix: /connect - + prefix: /connect ``` +**Note:** + +> To prevent strange issues, this route should be imported before your custom ones. + ### D) Working with Symfony 2.0 If you use Symfony 2.0, you need to import the `security_factory.xml` in your `security.yml`: diff --git a/Resources/doc/2x-facebook.md b/Resources/doc/2x-facebook.md index 00eb0631d..94711b626 100644 --- a/Resources/doc/2x-facebook.md +++ b/Resources/doc/2x-facebook.md @@ -8,7 +8,7 @@ Next configure a resource owner of type `facebook` with appropriate for the available scopes. ``` yaml -# app/config.yml +# app/config/config.yml hwi_oauth: resource_owners: diff --git a/Resources/doc/2x-github.md b/Resources/doc/2x-github.md index ac8bc4b15..377b75fa0 100644 --- a/Resources/doc/2x-github.md +++ b/Resources/doc/2x-github.md @@ -8,7 +8,7 @@ Next configure a resource owner of type `github` with appropriate for the available scopes. ``` yaml -# app/config.yml +# app/config/config.yml hwi_oauth: resource_owners: diff --git a/Resources/doc/2x-google.md b/Resources/doc/2x-google.md index fcbfd8965..6e445c950 100644 --- a/Resources/doc/2x-google.md +++ b/Resources/doc/2x-google.md @@ -8,7 +8,7 @@ Next configure a resource owner of type `google` with appropriate for the available scopes. ``` yaml -# app/config.yml +# app/config/config.yml hwi_oauth: resource_owners: diff --git a/Resources/doc/2x-linkedin.md b/Resources/doc/2x-linkedin.md index f1ffd37cd..5241af243 100644 --- a/Resources/doc/2x-linkedin.md +++ b/Resources/doc/2x-linkedin.md @@ -3,9 +3,8 @@ Step 2x: Setup Linkedin First you will have to register your application on Linkedin. Check out the documentation for more information: https://developer.linkedin.com/documents/authentication. -Next configure a resource owner of type `linkedin` with appropriate -`client_id`, `client_secret` and `scope`. Refer to the Linkedin documentation -for the available scopes. +Next configure a resource owner of type `linkedin` with appropriate `client_id`, +`client_secret`. ``` yaml # app/config.yml diff --git a/Resources/doc/2x-others.md b/Resources/doc/2x-others.md index 2d3fea997..9c9a3f03d 100644 --- a/Resources/doc/2x-others.md +++ b/Resources/doc/2x-others.md @@ -5,7 +5,7 @@ If the resource owners you are looking for isn't implemented in this bundle yet resource owner: ``` yaml -# app/config.yml +# app/config/config.yml hwi_oauth: resource_owners: @@ -26,7 +26,7 @@ hwi_oauth: or an oauth1: ``` yaml -# app/config.yml +# app/config/config.yml hwi_oauth: resource_owners: @@ -38,7 +38,7 @@ hwi_oauth: access_token_url: https://path.to/oauth/v1/token authorization_url: https://path.to/oauth/v1/authorize infos_url: https://path.to/api/user - scope: "" + realm: "" user_response_class: HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse paths: username: id diff --git a/Resources/doc/3-configuring_the_security_layer.md b/Resources/doc/3-configuring_the_security_layer.md index be077bb1f..fb4017bb2 100644 --- a/Resources/doc/3-configuring_the_security_layer.md +++ b/Resources/doc/3-configuring_the_security_layer.md @@ -43,10 +43,19 @@ security: > Starting from Symfony 2.1 the paths configured at the `resource_owners` > section should be defined in your routing. > -> ``` -> # app/routing.yml +> ``` yaml +> # app/config/routing.yml +> facebook_login: +> pattern: /login/check-facebook +> +> google_login: +> pattern: /login/check-google +> +> custom_login: +> pattern: /login/check-custom +> > github_login: -> pattern: /login/github +> pattern: /login/check-github > ``` diff --git a/Resources/doc/configuring_the_http_client.md b/Resources/doc/configuring_the_http_client.md index bd22e4946..b6c5fa3dd 100644 --- a/Resources/doc/configuring_the_http_client.md +++ b/Resources/doc/configuring_the_http_client.md @@ -6,7 +6,7 @@ owners, it's pre-configured by default, but you can adjust some settings of this reflect requirements of your environment. ``` yaml -# app/config.yml +# app/config/config.yml hwi_oauth: http_client: diff --git a/Resources/doc/reference_configuration.md b/Resources/doc/reference_configuration.md index 80228b65c..df8007c66 100644 --- a/Resources/doc/reference_configuration.md +++ b/Resources/doc/reference_configuration.md @@ -12,6 +12,7 @@ hwi_oauth: client_id: client_secret: scope: "" + google: type: google client_id: @@ -28,7 +29,7 @@ hwi_oauth: client_secret: scope: "" - my_custom_provider_2: + my_custom_oauth2: type: oauth2 client_id: client_secret: @@ -42,7 +43,7 @@ hwi_oauth: displayname: username email: email - my_custom_provider_1: + my_custom_oauth1: type: oauth1 client_id: client_secret: @@ -50,7 +51,7 @@ hwi_oauth: access_token_url: https://path.to/oauth/v1/token authorization_url: https://path.to/oauth/v1/authorize infos_url: https://path.to/api/user - scope: "" + realm: "" user_response_class: HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse paths: username: id @@ -114,4 +115,24 @@ security: service: hwi_oauth.user.provider.fosub_bridge ``` +``` yaml +# app/config/routing.yml + +hwi_oauth_redirect: + resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml" + prefix: /connect + +facebook_login: + pattern: /login/check-facebook + +google_login: + pattern: /login/check-google + +custom_login: + pattern: /login/check-custom + +github_login: + pattern: /login/check-github +``` + [Return to the index.](index.md)