omniauth-linkedin-openid 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 200128bdbafbd862d10c5694e699ca036ad03a195b3f24ebd407747243470591
4
- data.tar.gz: 24dd2b40e1e9ce855829c3ed5850b2f45e89348b583655c7895a90ce4252af7d
3
+ metadata.gz: c61c2750e538549bc8592c294baefe4f2e0500ee421bf17b016deb145e362e0f
4
+ data.tar.gz: 98d1d95ebaee15aee2019ceb16f6a3fb76318272d5fb8bc6a5b25887a4ccb913
5
5
  SHA512:
6
- metadata.gz: 511d291fec173c1f43e5d2df576e7165228fedc46dbd6992a708c9b4f0e7eea81efadf4b46bba5e963623a6b8b7ebeacdd9ee7159cc3c1cf985de7438c8c9921
7
- data.tar.gz: 96fc2818001fac2167e991c61d6753418e5ae8046c50211939d9c054cdf1804b42c77582217a0c84793e9f5d05025c4798c55a3410dedea7cad87f4cc8bfff23
6
+ metadata.gz: a6e8be51a8670b35aa8ef2dc251f199d1c54ee6c18aba294c01a8b874f84c964488ef11d024386a6c659cc89798967e2c118edb280ff77599fb9e366abd02af4
7
+ data.tar.gz: b78ed6d4fcf1c13036583da58ce9cb9688f2259a12c6ebf94caca99c381ca702fbcf7683e73e050d6b66e5f205b86417806e32d25c276495a8ed22e49756821b
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OmniAuth LinkedIn
2
2
 
3
- ![Ruby](https://github.com/omniauth/omniauth-github/workflows/Ruby/badge.svg?branch=master)
3
+ ![Ruby](https://github.com/jclusso/omniauth-linkedin-openid/workflows/Ruby/badge.svg?branch=master)
4
4
  [![Gem](https://img.shields.io/gem/v/omniauth-linkedin-openid)](https://rubygems.org/gems/omniauth-linkedin-openid)
5
5
 
6
6
  This is the a OmniAuth strategy for authenticating to LinkedIn using OpenID. To
@@ -21,7 +21,9 @@ gem 'omniauth-linkedin-openid'
21
21
 
22
22
  ```ruby
23
23
  use OmniAuth::Builder do
24
- provider :linkedin, ENV['LINKEDIN_CLIENT_ID'], ENV['LINKEDIN_CLIENT_SECRET']
24
+ provider :linkedin,
25
+ client_id: ENV['LINKEDIN_CLIENT_ID'],
26
+ client_secret: ENV['LINKEDIN_CLIENT_SECRET']
25
27
  end
26
28
  ```
27
29
 
@@ -36,7 +38,9 @@ The following scopes are requested by default:
36
38
  Here is an example of how you can configure the `scope` option:
37
39
 
38
40
  ```ruby
39
- provider :linkedin, ENV['LINKEDIN_CLIENT_ID'], ENV['LINKEDIN_CLIENT_SECRET'],
41
+ provider :linkedin,
42
+ client_id: ENV['LINKEDIN_CLIENT_ID'],
43
+ client_secret: ENV['LINKEDIN_CLIENT_SECRET'],
40
44
  scope: 'openid profile email'
41
45
  ```
42
46
 
@@ -51,7 +55,9 @@ When specifying which permissions you want users to grant to your application, y
51
55
  Here is an example of how you can configure the `fields` option:
52
56
 
53
57
  ```ruby
54
- provider :linkedin, ENV['LINKEDIN_CLIENT_ID'], ENV['LINKEDIN_CLIENT_SECRET'],
58
+ provider :linkedin,
59
+ client_id: ENV['LINKEDIN_CLIENT_ID'],
60
+ client_secret: ENV['LINKEDIN_CLIENT_SECRET'],
55
61
  fields: %w(id full-name email-address)
56
62
  ```
57
63
 
@@ -68,3 +74,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/jcluss
68
74
  ## License
69
75
 
70
76
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
77
+
78
+ ## Credits
79
+
80
+ Thanks to [@decioferreira](https://github.com/decioferreira) for making [omniauth-linkedin-oauth2](https://github.com/decioferreira/omniauth-linkedin-oauth2) which this was based on.
@@ -8,7 +8,8 @@ module OmniAuth
8
8
  option :client_options, {
9
9
  :site => 'https://api.linkedin.com',
10
10
  :authorize_url => 'https://www.linkedin.com/oauth/v2/authorization?response_type=code',
11
- :token_url => 'https://www.linkedin.com/oauth/v2/accessToken'
11
+ :token_url => 'https://www.linkedin.com/oauth/v2/accessToken',
12
+ :token_method => :post_with_query_string
12
13
  }
13
14
 
14
15
  option :scope, 'openid profile email'
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module LinkedInOpenID
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -22,6 +22,7 @@ Gem::Specification.new do |gem|
22
22
  "source_code_uri" => "https://github.com/jclusso/omniauth-linkedin-openid"
23
23
  }
24
24
 
25
+ gem.add_dependency 'oauth2', '~> 2.0'
25
26
  gem.add_dependency 'omniauth', '~> 2.0'
26
27
  gem.add_dependency 'omniauth-oauth2', '~> 1.8'
27
28
  gem.add_development_dependency 'rspec', '~> 3.5'
@@ -20,6 +20,10 @@ describe OmniAuth::Strategies::LinkedIn do
20
20
  it 'has correct `token_url`' do
21
21
  expect(subject.client.options[:token_url]).to eq('https://www.linkedin.com/oauth/v2/accessToken')
22
22
  end
23
+
24
+ it 'has a correct `token_method`' do
25
+ expect(subject.client.options[:token_method]).to eq(:post_with_query_string)
26
+ end
23
27
  end
24
28
 
25
29
  describe '#callback_path' do
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-linkedin-openid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Lusso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-12 00:00:00.000000000 Z
11
+ date: 2024-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: oauth2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: omniauth
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -125,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
139
  - !ruby/object:Gem::Version
126
140
  version: '0'
127
141
  requirements: []
128
- rubygems_version: 3.2.33
142
+ rubygems_version: 3.3.3
129
143
  signing_key:
130
144
  specification_version: 4
131
145
  summary: OmniAuth strategy for LinkedIn using OpenID.