omniauth-raven 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Raven
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- require 'omniauth/core'
1
+ require 'omniauth'
2
2
  require 'cgi'
3
3
 
4
4
  module OmniAuth
@@ -53,6 +53,28 @@ module OmniAuth
53
53
 
54
54
  return redirect auth_url
55
55
  end
56
+
57
+ def callback_phase
58
+
59
+ return fail!(:invalid_response) if request.params['WLS-Response'] == ""
60
+
61
+ wls_response = request.params['WLS-Response'].to_s
62
+ ver, status, msg, issue, id, url, principal, auth, sso, life, params, kid, sig = wls_response.split('!')
63
+
64
+ return fail!(:invalid_credentials) if status != "200"
65
+
66
+ @name = principal
67
+ @email = principal+"@cam.ac.uk"
68
+
69
+ super
70
+
71
+ end
72
+
73
+ uid { @email }
74
+ info {
75
+ options[:fields][:name] = @name
76
+ options[:fields][:email] = @email
77
+ }
56
78
  end
57
79
  end
58
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: