oa-globocom 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/oa-globocom/version.rb +1 -1
- data/lib/oa-globocom.rb +1 -1
- data/lib/omni_auth/strategies/globocom.rb +6 -6
- data/oa-globocom.gemspec +1 -1
- metadata +3 -3
data/lib/oa-globocom/version.rb
CHANGED
data/lib/oa-globocom.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
1
|
+
require 'globocom-auth/config'
|
2
|
+
require 'globocom-auth/user'
|
3
|
+
require 'globocom-auth/gateway'
|
4
4
|
|
5
5
|
module OmniAuth
|
6
6
|
module Strategies
|
@@ -8,13 +8,13 @@ module OmniAuth
|
|
8
8
|
include OmniAuth::Strategy
|
9
9
|
|
10
10
|
def initialize(app, options = {})
|
11
|
-
|
11
|
+
GloboComAuth::Config.load_file(options[:config])
|
12
12
|
|
13
13
|
super(app, :globocom, options)
|
14
14
|
end
|
15
15
|
|
16
16
|
def request_phase
|
17
|
-
redirect "#{
|
17
|
+
redirect "#{GloboComAuth::Config.login_url}/#{service_id}?url=#{callback_url}"
|
18
18
|
end
|
19
19
|
|
20
20
|
def callback_phase
|
@@ -30,7 +30,7 @@ module OmniAuth
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def user
|
33
|
-
@user ||=
|
33
|
+
@user ||= GloboComAuth::User.new(:glb_id => request.params['GLBID'], :ip => client_ip, :service_id => service_id)
|
34
34
|
end
|
35
35
|
|
36
36
|
def service_id
|
data/oa-globocom.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = %w(lib)
|
17
17
|
|
18
18
|
s.add_dependency 'oa-core'
|
19
|
-
s.add_dependency '
|
19
|
+
s.add_dependency 'globocom-auth', '0.1.0'
|
20
20
|
s.add_development_dependency 'rack'
|
21
21
|
s.add_development_dependency 'rspec'
|
22
22
|
s.add_development_dependency 'rr'
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: oa-globocom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.2.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Bruno
|
@@ -26,14 +26,14 @@ dependencies:
|
|
26
26
|
type: :runtime
|
27
27
|
version_requirements: *id001
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: globocom-auth
|
30
30
|
prerelease: false
|
31
31
|
requirement: &id002 !ruby/object:Gem::Requirement
|
32
32
|
none: false
|
33
33
|
requirements:
|
34
34
|
- - "="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.1.0
|
37
37
|
type: :runtime
|
38
38
|
version_requirements: *id002
|
39
39
|
- !ruby/object:Gem::Dependency
|