user_mgmt 0.8 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/user_mgmt/sessions_controller.rb +11 -2
- data/lib/user_mgmt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d86ce874e9fca5b3fbdbacd650223f1af7a58f64
|
|
4
|
+
data.tar.gz: f82377f7e78d3373a54b306e5dd5cfb168eea1c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ab66aa8d4826c5fe1e479abb2142eb92f9d7656184617c681f0aac982c54e408d56797a323c7dec7bf182d42501ca91447290b8f4df15e0cafd21d666b1cfe8
|
|
7
|
+
data.tar.gz: 6d23c77649db0a08fd0b2762f35b5d26b152954454d90942dcadb6b44c2efabfe9b85303610ab0621c6351c10077fd946c21f17bdc79d6c6eb1f984e9e9edc60
|
|
@@ -41,14 +41,23 @@ module UserMgmt
|
|
|
41
41
|
@provider = "windows_live"
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
@umid = current_user[:umid] if user_logged_in?
|
|
45
|
+
|
|
44
46
|
response = log_in_oauth @uid, @provider
|
|
45
47
|
|
|
46
48
|
# if user logged in succesfully, just redirect to main page,
|
|
47
49
|
# otherwise it means the user doesn't exist yet, so continue
|
|
48
50
|
# normaly (user will be asked for his email).
|
|
49
51
|
if response[:status] == "200"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
if @umid
|
|
53
|
+
redirect_to main_app.root_path, flash: { error: "User already signed up for the app!" }
|
|
54
|
+
else
|
|
55
|
+
cookies.permanent[:user_session_id] = response[:body]["session"]
|
|
56
|
+
redirect_to main_app.root_path, flash: { success: "User logged in!" }
|
|
57
|
+
end
|
|
58
|
+
elsif @umid
|
|
59
|
+
add_strategy @uid, @provider, @umid, cookies[:user_session_id]
|
|
60
|
+
redirect_to main_app.root_path, flash: { success: "Strategy added successfully!" }
|
|
52
61
|
end
|
|
53
62
|
|
|
54
63
|
end
|
data/lib/user_mgmt/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: user_mgmt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Danilo Faria, Fernando Gorodscy, Josh Leslie
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-11-
|
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sqlite3
|