rails_cerberus 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cerberus/sessions_controller.rb +4 -1
- data/lib/cerberus/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: 41fcf03db53b27aefcfe06031039fe33fc940f38
|
4
|
+
data.tar.gz: c4d6335258e37541de4e6f7e7bfd2fd36d5ca67d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d6218cc662e5113b50303ecfbad76dc3a338f2f606c7d22af54af109fd4a9c685877a760727a3a0bdb583d936d68639e9bcaada1cd4d2035c94b058b294776f
|
7
|
+
data.tar.gz: 88b46440532878bc5504f29d0ccd0b7c151cea01e156519c911e49dafc6bfce4318547791d81a0b9cfcd4581f661a1c450d48c31b613e084a2b6467e5b7792cd
|
@@ -2,7 +2,7 @@ require 'cerberus/identity'
|
|
2
2
|
|
3
3
|
class Cerberus::SessionsController < ActionController::Base
|
4
4
|
def create
|
5
|
-
identity = Cerberus::Identity.find_or_create_by!
|
5
|
+
identity = Cerberus::Identity.find_or_create_by! identity_params
|
6
6
|
identity.user ||= Cerberus.config[:identities][:user_class_name].constantize.find_or_create_by! email: auth[:info][:email]
|
7
7
|
identity.save
|
8
8
|
|
@@ -18,4 +18,7 @@ class Cerberus::SessionsController < ActionController::Base
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def auth() env['omniauth.auth'] end
|
21
|
+
def auth_params() @auth_params ||= ActionController::Parameters.new(auth) end
|
22
|
+
def identity_params() auth_params.permit(:provider, :uid) end
|
23
|
+
def user_params() auth_params.permit(info: [:email]) end
|
21
24
|
end
|
data/lib/cerberus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_cerberus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Oga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|