From ff65eaac2a6d83c40f5cbcd65ed019bdbfacaaef Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 13 Sep 2017 14:01:51 +0200 Subject: [PATCH] Add Oauth and Graphql sections --- docs/en/SUMMARY.md | 10 ++++++++++ docs/en/features/graphql.md | 3 +++ docs/en/features/oauth.md | 30 ++++++++++++++++++++++++++++++ docs/es/SUMMARY.md | 4 ++++ docs/es/features/graphql.md | 3 +++ docs/es/features/oauth.md | 31 +++++++++++++++++++++++++++++++ 6 files changed, 81 insertions(+) create mode 100644 docs/en/features/graphql.md create mode 100644 docs/en/features/oauth.md create mode 100644 docs/es/features/graphql.md create mode 100644 docs/es/features/oauth.md diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index 3db7d1e8d..ef1a8e055 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -24,6 +24,16 @@ * [Overwritting](customization/overwritting.md) * [Adding new features](customization/new_features.md) +### Features +* [OAuth](features/oauth.md) +* [GraphQL](features/graphql.md) + +* [Templating](customization/templating.md) +* [Texts & Translations](customization/translations.md) +* [Images](customization/images.md) +* [Overwritting](customization/overwritting.md) +* [Adding new features](customization/new_features.md) + ### Open Source project * [Code of conduct](open_source/code_of_conduct.md) * [Contributing](open_source/contributing.md) diff --git a/docs/en/features/graphql.md b/docs/en/features/graphql.md new file mode 100644 index 000000000..74e597a1c --- /dev/null +++ b/docs/en/features/graphql.md @@ -0,0 +1,3 @@ +# GraphQL + +Until we move the documentation to here, you can check https://github.com/consul/consul/blob/master/doc/api/api_en.md diff --git a/docs/en/features/oauth.md b/docs/en/features/oauth.md new file mode 100644 index 000000000..fd78de1cc --- /dev/null +++ b/docs/en/features/oauth.md @@ -0,0 +1,30 @@ +# OAuth + +You can configure authentication services with external OAuth suppliers, right now Twitter, Facebook and Google are supported. + +## 1. Create an App on the platform +For each platform, go to their developers section and follow their guides to create an app. + +## 2. Set your CONSUL's url + +They'll ask you for your CONSUL's auth URL, and as you can see running `rake routes` at your CONSUL repo locally: + ```bash +user_omniauth_authorize GET|POST /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/twitter|facebook|google_oauth2/} +``` + +So for example the URL for facebook application would be `yourdomain.com/users/auth/facebook.json` + +## 3. Set key & secret values + +When you complete the application registration you'll get a *key* and *secret* values, those need to be stored at your `config/secrets.yml` file: + +```yml + twitter_key: "" + twitter_secret: "" + facebook_key: "" + facebook_secret: "" + google_oauth2_key: "" + google_oauth2_secret: "" +``` + +*NOTE:* Also in the case of Google, verify that the APIs *Contacts API* and *Google+ API* are enabled for the application. diff --git a/docs/es/SUMMARY.md b/docs/es/SUMMARY.md index e8bf86786..62a9bdacb 100644 --- a/docs/es/SUMMARY.md +++ b/docs/es/SUMMARY.md @@ -24,6 +24,10 @@ * [Adaptar la aplicación](customization/overwritting.md) * [Añadir nuevas funcionalidades](customization/new_features.md) +### Funcionalidades +* [OAuth](features/oauth.md) +* [GraphQL](features/graphql.md) + ### Proyecto Open Source * [Código de conducta](open_source/code_of_conduct.md) * [Contribuciones](open_source/contributing.md) diff --git a/docs/es/features/graphql.md b/docs/es/features/graphql.md new file mode 100644 index 000000000..a845c7c23 --- /dev/null +++ b/docs/es/features/graphql.md @@ -0,0 +1,3 @@ +# GraphQL + +Hasta que movamos al documentación aquí, puedes usar https://github.com/consul/consul/blob/master/doc/api/api_es.md diff --git a/docs/es/features/oauth.md b/docs/es/features/oauth.md new file mode 100644 index 000000000..49d836263 --- /dev/null +++ b/docs/es/features/oauth.md @@ -0,0 +1,31 @@ +# OAuth + +Puedes configurar la autenticación con servicios externos usando OAuth, por ahora están soportados Twitter, Facebook y Google. + +## 1. Crea una aplicación en la plataforma +Para cada plataforma, sigue las instrucciones en la sección de desarrolladores de su página web. + +## 2. Establece la url de tu CONSUL + +Te preguntarán por la URL de autenticación de tu instalación de CONSUL, y como podrás comprobar corriendo la tarea `rake routes` en tu repositorio local: + +```bash +user_omniauth_authorize GET|POST /users/auth/:provider(.:format) users/omniauth_callbacks#passthru {:provider=>/twitter|facebook|google_oauth2/} +``` + +Por ejemplo para facebook la URL sería `yourdomain.com/users/auth/facebook.json` + +## 3. Establece la clave y secreto + +Cuando completes el registro de la aplicación en su plataforma te darán un *key* y *secret*, estos deben ser almacenados en tu fichero `config/secrets.yml`: + +```yml + twitter_key: "" + twitter_secret: "" + facebook_key: "" + facebook_secret: "" + google_oauth2_key: "" + google_oauth2_secret: "" +``` + +*NOTA:* Además en el caso de Google, verifica que las APIs de *Contacts API* y *Google+ API* están habilitadas para tu aplicación en su plataforma.