omniauth-pop-up-talent 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZGEzMmM3YjI5NDkzNjJlNTU5NDc1ODYzZDA4MWE5MDJhN2NkM2MyYw==
5
+ data.tar.gz: !binary |-
6
+ Y2FhNDJkYzI5M2MzNTJhYmIyYjMxNzhmYTc1NzlmOTk3NDI2ZDBmZg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZmMzMzhjNjQyY2ZlYzJiYWI0ZWI2OWMwMDZiMDI4Nzk3MWI2NjMyOWVlZTZm
10
+ MzQ0ZmQ4MWVjOWY2Mzk0Mjc3ODZhMGYwOTI1ZDRhYmFmOThkOGM1OTEyNTU0
11
+ ZjhkZTZmZTdkMTJjYWExNzRhYTU4Y2FlY2ZhOGJiNDI5MjA2ZDE=
12
+ data.tar.gz: !binary |-
13
+ YzEzNzkxMDU2YmVhYzBhMDM3YTIzYzRmOGU5NzU0MzgwYzI5YmNhOTc5NzUz
14
+ YWJmZWI1Mjk2NTQ0NWQ1MTRhN2Q5ZWEwYzQ5YjVmNTA5NTk1M2RmOGY4Mzll
15
+ ZmU2YzUyNjViZDYyYjQ2ZDA5ZDI1ZTM4NDA1MGI5YTYzN2IwZTg=
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module PopUpTalent
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ require 'omniauth-oauth2'
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class PopUpTalent < OmniAuth::Strategies::OAuth2
6
+ DEFAULT_HOST = "https://accounts.popuptalent.com"
6
7
  option :name, "pop_up_talent"
7
8
 
8
9
  uid { raw_info['id'].to_s }
@@ -15,10 +16,21 @@ module OmniAuth
15
16
  }
16
17
  end
17
18
 
19
+ def self.invalidate_sessions!(opts = {})
20
+ key = opts.fetch(:key)
21
+ secret = opts.fetch(:secret)
22
+ host = opts.fetch(:host, DEFAULT_HOST)
23
+ token = opts.fetch(:token)
24
+
25
+ client = ::OAuth2::Client.new(key, secret, site: host)
26
+ access_token = ::OAuth2::AccessToken.new(client, token, mode: :query, param_name: :oauth_token)
27
+ access_token.delete('/current_session')
28
+ end
29
+
18
30
  def initialize(app, opts = {})
19
31
  super(app, opts[:key], opts[:secret])
20
32
 
21
- host = opts[:host] || "https://accounts.popuptalent.com"
33
+ host = opts[:host] || DEFAULT_HOST
22
34
  options[:client_options][:site] = host
23
35
  options[:client_options][:token_url] = "#{host}/oauth/authorize"
24
36
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-pop-up-talent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Adam Pohorecki
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-11-21 00:00:00.000000000 Z
11
+ date: 2013-12-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: omniauth-oauth2
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -78,26 +71,25 @@ files:
78
71
  homepage: http://git.bitsilk.com/adam/omniauth-pop-up-talent
79
72
  licenses:
80
73
  - MIT
74
+ metadata: {}
81
75
  post_install_message:
82
76
  rdoc_options: []
83
77
  require_paths:
84
78
  - lib
85
79
  required_ruby_version: !ruby/object:Gem::Requirement
86
- none: false
87
80
  requirements:
88
81
  - - ! '>='
89
82
  - !ruby/object:Gem::Version
90
83
  version: '0'
91
84
  required_rubygems_version: !ruby/object:Gem::Requirement
92
- none: false
93
85
  requirements:
94
86
  - - ! '>='
95
87
  - !ruby/object:Gem::Version
96
88
  version: '0'
97
89
  requirements: []
98
90
  rubyforge_project:
99
- rubygems_version: 1.8.23
91
+ rubygems_version: 2.1.11
100
92
  signing_key:
101
- specification_version: 3
93
+ specification_version: 4
102
94
  summary: Omniauth strategy for authenticating against Pop Up Talent
103
95
  test_files: []