Skip to content

Commit

Permalink
Merge pull request hwi#47 from stloyd/docs_update
Browse files Browse the repository at this point in the history
Fix and cleanup some docs.
  • Loading branch information
asm89 committed Jun 29, 2012
2 parents 7a90bbe + cda5129 commit 47522bd
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 18 deletions.
7 changes: 5 additions & 2 deletions Resources/doc/1-setting_up_the_bundle.md
Expand Up @@ -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`:
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/2x-facebook.md
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/2x-github.md
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/2x-google.md
Expand Up @@ -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:
Expand Down
5 changes: 2 additions & 3 deletions Resources/doc/2x-linkedin.md
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Resources/doc/2x-others.md
Expand Up @@ -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:
Expand All @@ -26,7 +26,7 @@ hwi_oauth:
or an oauth1:

``` yaml
# app/config.yml
# app/config/config.yml

hwi_oauth:
resource_owners:
Expand All @@ -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
Expand Down
15 changes: 12 additions & 3 deletions Resources/doc/3-configuring_the_security_layer.md
Expand Up @@ -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
> ```
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/configuring_the_http_client.md
Expand Up @@ -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:
Expand Down
27 changes: 24 additions & 3 deletions Resources/doc/reference_configuration.md
Expand Up @@ -12,6 +12,7 @@ hwi_oauth:
client_id: <client_id>
client_secret: <client_secret>
scope: ""

google:
type: google
client_id: <client_id>
Expand All @@ -28,7 +29,7 @@ hwi_oauth:
client_secret: <client_secret>
scope: ""

my_custom_provider_2:
my_custom_oauth2:
type: oauth2
client_id: <client_id>
client_secret: <client_secret>
Expand All @@ -42,15 +43,15 @@ hwi_oauth:
displayname: username
email: email

my_custom_provider_1:
my_custom_oauth1:
type: oauth1
client_id: <client_id>
client_secret: <client_secret>
request_token_url: https://path.to/oauth/v1/requestToken
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
Expand Down Expand Up @@ -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)

0 comments on commit 47522bd

Please sign in to comment.