omniauth-nwbbis 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-nwbbis.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fed4cfd5c9f7e90e0c6ab83674a823367a81cb7
|
4
|
+
data.tar.gz: a9a172674608596afa1fce01c852e5a1c246ef2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bf02b5b01a63bb98ff6425c3b6589dcb8f7302bc3163657bc339f534c4597f2efa634ee86489abf8c05fe4042d528ed9b095503525865218ae264859f2f803c
|
7
|
+
data.tar.gz: 4076a79b12470fccef79dec169e50afa98e7774898846817f3885fbf790e4731f40f9d1b885ed543c16bdb66a4d448245306ad8639b8eb648da749a59e20b875
|
data/lib/omniauth-nwbbis.rb
CHANGED
@@ -53,16 +53,17 @@ module OmniAuth
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def auth_hash(user_info)
|
56
|
-
|
56
|
+
# TODO fail if no email is given
|
57
|
+
hash = AuthHash.new(:provider => name, :uid => CGI.unescape(user_info.fetch("a:EMail", "")))
|
57
58
|
|
58
59
|
puts user_info
|
59
60
|
|
60
|
-
first_name = user_info.fetch("a:Vorname", "")
|
61
|
-
last_name
|
61
|
+
first_name = CGI.unescape(user_info.fetch("a:Vorname", ""))
|
62
|
+
last_name = CGI.unescape(user_info.fetch("a:Name", ""))
|
62
63
|
|
63
64
|
hash.info = {
|
64
65
|
:name => "#{first_name} #{last_name}",
|
65
|
-
:email => user_info.fetch("a:EMail",
|
66
|
+
:email => CGI.unescape(user_info.fetch("a:EMail", ""))
|
66
67
|
}
|
67
68
|
|
68
69
|
hash
|