exvo-auth 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/exvo-auth.gemspec
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
class ExvoAuth::Strategies::Base < OmniAuth::Strategies::OAuth2
|
2
|
-
def initialize(app, name,
|
3
|
-
options[:site]
|
2
|
+
def initialize(app, name, options = {})
|
3
|
+
options[:site] ||= ExvoAuth::Config.host
|
4
|
+
options[:client_id] ||= ExvoAuth::Config.client_id
|
5
|
+
options[:client_secret] ||= ExvoAuth::Config.client_secret
|
4
6
|
|
5
|
-
if options[:site].nil? ||
|
7
|
+
if options[:site].nil? || options[:client_id].nil? || options[:client_secret].nil?
|
6
8
|
raise(ArgumentError, "Please configure host, client_id and client_secret")
|
7
9
|
end
|
8
10
|
|
9
|
-
super(app, name,
|
11
|
+
super(app, name, options.delete(:client_id), options.delete(:client_secret), options)
|
10
12
|
end
|
11
13
|
|
12
14
|
def user_data
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class ExvoAuth::Strategies::Interactive < ExvoAuth::Strategies::Base
|
2
|
-
def initialize(app,
|
3
|
-
super(app, :interactive,
|
2
|
+
def initialize(app, options = {})
|
3
|
+
super(app, :interactive, options)
|
4
4
|
end
|
5
5
|
|
6
6
|
def request_phase(options = {})
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class ExvoAuth::Strategies::NonInteractive < ExvoAuth::Strategies::Base
|
2
|
-
def initialize(app,
|
3
|
-
super(app, :non_interactive,
|
2
|
+
def initialize(app, options = {})
|
3
|
+
super(app, :non_interactive, options)
|
4
4
|
end
|
5
5
|
|
6
6
|
def request_phase(options = {})
|