omniauth-nwbbis 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/omniauth-nwbbis.rb +5 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 606d757c5ca3b35852c966f87d162f939cf230d1
4
- data.tar.gz: c688da3e5f968ff460e2a171f7ec20c8a4ae45aa
3
+ metadata.gz: 8fed4cfd5c9f7e90e0c6ab83674a823367a81cb7
4
+ data.tar.gz: a9a172674608596afa1fce01c852e5a1c246ef2a
5
5
  SHA512:
6
- metadata.gz: c31549f19e17878d9d2903a172aa88c986ba34f284399604d3e7fc73df415c8d21678dbf6efd3c77e525583b85134a49702d924f840da3cef8410fc0fad357c3
7
- data.tar.gz: 861b348bf3bf8631cc2b15a428635e44764ae1e7fc0ee5b79038dd81cdde42cc00759d92cf3c366c94ddd4ecb458d1c0578df9e61f38b3aa83a6bef1b502e37c
6
+ metadata.gz: 6bf02b5b01a63bb98ff6425c3b6589dcb8f7302bc3163657bc339f534c4597f2efa634ee86489abf8c05fe4042d528ed9b095503525865218ae264859f2f803c
7
+ data.tar.gz: 4076a79b12470fccef79dec169e50afa98e7774898846817f3885fbf790e4731f40f9d1b885ed543c16bdb66a4d448245306ad8639b8eb648da749a59e20b875
@@ -53,16 +53,17 @@ module OmniAuth
53
53
  end
54
54
 
55
55
  def auth_hash(user_info)
56
- hash = AuthHash.new(:provider => name, :uid => user_info.fetch("a:EMail", nil))
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 = user_info.fetch("a: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", nil)
66
+ :email => CGI.unescape(user_info.fetch("a:EMail", ""))
66
67
  }
67
68
 
68
69
  hash
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-nwbbis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Bücker