From 0b90c563cb6cd14c2805e96159dfd2997f247df5 Mon Sep 17 00:00:00 2001
From: Dmitry Kovalenok <dmitry.kovalenok@twinslash.com>
Date: Wed, 14 Nov 2012 10:24:53 +0300
Subject: [PATCH] modifying readme

---
 README.md        | 37 +++++++++++++++++++++++++++++++++++++
 config/routes.rb |  2 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 README.md

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..2c74bd6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,37 @@
+## Redmine omniauth google
+
+This plugin is used to authenticate in redmine through Google.
+
+### Installation:
+
+Choose folder /plugins, make command git clone git@gitlab.tsdv.net:redmine_omniauth_google.git. Restart rails server.
+
+### Registration
+
+To make possible to authenticate via Google you must first to register application in Google
+
+* Go to the [registration](https://code.google.com/apis/console) link. 
+* Press "API Access" in left menu bar.
+* Click the button "Create an OAuth 2.0 client ID".
+* When registering specify application name, for example, Redmine Oauth Google.
+* In section "Your site or hostname" choose mode http, in the text input box enter your domain, for example, yourdomain.com. 
+* Press the button "Create client ID".
+
+The registrations is complete.
+
+### Configuration
+
+* Login as administrator. In top menu select "Administration". Choose menu item Plugins. In plugins list choose "Redmine Omniauth Google plugin". Press "Configure". 
+* Fill Сlient ID & Client Secret by corresponding values, obtained by Google. 
+* Put the check "Oauth authentification", to make it possible to login through Google. Click Apply. Users can now to use apportunity to login via Google.
+
+To limit login through Google for other domains you have to fill allowed domains in the text box field the "Allowed domains". Domains must be separated by newlines. For example:
+
+onedomain.com
+otherdomain.com
+
+### Work process
+
+User goes to the login page(sign in). User clicks the button with Google image. The plugin redirects him to Google. User enters his the еmail & password from Google. Google redirect user back to plugins controller. Then the following cases:
+1. If auto registration is enabled, user is redirected to 'my/page'
+2. In  others cases user is redirected to 'login'.
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 269600b..e9e7852 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,2 +1,2 @@
 get 'oauth_google', to: 'redmine_oauth#oauth_google'
-get 'oauth_google_callback', to: 'redmine_oauth#oauth_google_callback'
\ No newline at end of file
+get 'oauth2callback', to: 'redmine_oauth#oauth_google_callback'
\ No newline at end of file
-- 
GitLab