omniauth-osso 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0103d6e8c37362ce1b7280de5ebfd9ee2c7fcb38fb27b7625990cbc880707d8
4
- data.tar.gz: 166b30efdda9703dbe1b9d9b1162d076404eb3235972219e7eb793a06f0c12f2
3
+ metadata.gz: ef269453ed0ad4abbd20a3b0fef2798314458a191e8328ab324cb2d901756bf8
4
+ data.tar.gz: ff3b08d2e09711b81e9200e274c323f01da0b84e0b6006197383cb2a96a30cd8
5
5
  SHA512:
6
- metadata.gz: 7fee3a7e97f1d37c9e3b5ae94ce82939dcd71c9b9e1c39d2bb9b08516e9e37cb040a96e432ce3845126fa8f3a1e02ec049a616b519a7905ef39aa1d70c4339e8
7
- data.tar.gz: dc3e14fbc609efac8ea657fcfecffd9454eb88b60eb244de699bc40097e3eb1785fbabbc4dfdb1d40ff6e97cba8362fe7539510bd1e04ab63ee755c53f8f148e
6
+ metadata.gz: bebba8a9c1fa6cbf764cd8d524c474095f954c9349fe0f471e8746bb3f72f6f2adba774d32a96fbb29a3c28b7960b8d1770fb8f0967955e4b455ffb92fe7afa1
7
+ data.tar.gz: d8efb2480199d7ea9d48ad5b296dc10df47f2e001ddad06b01664e4f416e7c82222163ce3845ee1b3aed2920077d4d15ed088789844aa3e692e4e775dbc958d1
@@ -10,8 +10,8 @@ steps:
10
10
  - bundle exec rubocop
11
11
 
12
12
  - block: ":rubygems: Publish :red_button:"
13
- branches: "main"
13
+ if: build.tag != null
14
14
 
15
15
  - name: "Push :rubygems:"
16
16
  commands: "./bin/publish"
17
- branches: "main"
17
+ if: build.tag != null
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ labels:
8
+ - "dependencies"
@@ -0,0 +1,19 @@
1
+ name: auto-merge
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ auto-approve:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - uses: ahmadnassri/action-dependabot-auto-merge@v2
12
+ with:
13
+ target: minor
14
+ github-token: ${{ secrets.TOKEN }}
15
+ - uses: hmarr/auto-approve-action@v2.0.0
16
+ if: github.actor == 'dependabot[bot]'
17
+ with:
18
+ github-token: "${{ secrets.TOKEN }}"
19
+
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+
1
4
  Layout/LineLength:
2
5
  Max: 120
3
6
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-osso (0.1.5)
4
+ omniauth-osso (0.1.6)
5
5
  omniauth-oauth2 (~> 1.6.0)
6
6
 
7
7
  GEM
@@ -14,12 +14,13 @@ GEM
14
14
  crack (0.4.3)
15
15
  safe_yaml (~> 1.0.0)
16
16
  diff-lcs (1.3)
17
- faraday (1.0.1)
17
+ faraday (1.1.0)
18
18
  multipart-post (>= 1.2, < 3)
19
+ ruby2_keywords
19
20
  hashdiff (1.0.1)
20
21
  hashie (4.1.0)
21
22
  jaro_winkler (1.5.4)
22
- jwt (2.2.1)
23
+ jwt (2.2.2)
23
24
  method_source (1.0.0)
24
25
  multi_json (1.15.0)
25
26
  multi_xml (0.6.0)
@@ -70,6 +71,7 @@ GEM
70
71
  ruby-progressbar (~> 1.7)
71
72
  unicode-display_width (>= 1.4.0, < 2.0)
72
73
  ruby-progressbar (1.10.1)
74
+ ruby2_keywords (0.0.2)
73
75
  safe_yaml (1.0.5)
74
76
  unicode-display_width (1.7.0)
75
77
  webmock (3.8.3)
data/LICENSE CHANGED
@@ -2,33 +2,31 @@ Business Source License 1.1
2
2
 
3
3
  Parameters
4
4
 
5
- Licensor: Samuel Bauch
5
+ Licensor: EnterpriseOSS, Inc.
6
6
  Licensed Work: omniauth-osso
7
- The Licensed Work is (c) 2020 Samuel Bauch.
8
- Additional Use Grant: You may make use of the Licensed Work, provided that you do
9
- not use the Licensed Work in a Single Sign On Management
10
- Service.
11
-
12
- A "Single Sign On Management Service" is an offering
13
- (be it free or commercial) that uses the Licensed Work
14
- to allow third parties (other than your employees and
15
- contractors) to access the functionality of the
16
- Licensed Work such that any fourth parties directly
17
- benefit from the authentication, configuration, or
18
- documentation features of the Licensed Work.
19
-
20
- You thus may only use the Licensed Work in a manner
21
- whereby parties who directly benefit from the
22
- authentication, configuration, or documentation features
23
- of the Licensed Work are yourself, your employees or
24
- contractors, and your customers or partners.
25
-
26
- Change Date: 2023-05-01
7
+ The Licensed Work is (c) 2020 EnterpriseOSS, Inc.
8
+
9
+ Additional Use Grant: You and your Authorized Users may make use of the
10
+ Licensed Work for your internal business purposes,
11
+ provided that you do not (i) rent, lease, copy, transfer,
12
+ resell, sublicense, lease, time-share, or otherwise provide
13
+ access to the Licensed Work to a third party (except
14
+ Authorized Users) or (ii) incorporate the Licensed Work
15
+ (or any portion of such) with, or use it with or to provide,
16
+ any site, product, or service, other than on sites/applications
17
+ owned and operated by you.
18
+
19
+ An “Authorized User” is defined as an individual person
20
+ (e.g. your employee, contractor, agent) who is registered and
21
+ permitted by you to use the Licensed Work subject to these
22
+ restrictions.
23
+
24
+ Change Date: 2025-10-01
27
25
 
28
26
  Change License: Apache License, Version 2.0
29
27
 
30
28
  For information about alternative licensing arrangements for the Software,
31
- contact: hello@enterprise-oss.dev
29
+ contact: hello@enterpriseoss.dev
32
30
 
33
31
  Notice
34
32
 
@@ -108,4 +106,4 @@ other recipients of the licensed work to be provided by Licensor:
108
106
 
109
107
  3. To specify a Change Date.
110
108
 
111
- 4. Not to modify this License in any other way.
109
+ 4. Not to modify this License in any other way.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Osso
5
- VERSION = '0.1.5'
5
+ VERSION = '0.1.6'
6
6
  end
7
7
  end
@@ -27,9 +27,8 @@ module OmniAuth
27
27
 
28
28
  def request_params
29
29
  {
30
- redirect_uri: callback_url,
31
- domain: request_domain
32
- }
30
+ redirect_uri: callback_url
31
+ }.merge(user_param)
33
32
  end
34
33
 
35
34
  uid { raw_info['id'] }
@@ -42,7 +41,8 @@ module OmniAuth
42
41
 
43
42
  extra do
44
43
  {
45
- idp: raw_info['idp']
44
+ idp: raw_info['idp'],
45
+ requested: raw_info['requested']
46
46
  }
47
47
  end
48
48
 
@@ -85,14 +85,17 @@ module OmniAuth
85
85
  ENV['OSSO_REDIRECT_URI'] || super
86
86
  end
87
87
 
88
- def request_domain
89
- return @request_domain if defined?(@request_domain)
88
+ def user_param
89
+ return @user_param if defined?(@user_param)
90
90
 
91
- @request_domain = request.params['domain'] || request.params['email'].split('@')[1]
91
+ @user_param = {
92
+ domain: request.params['domain'],
93
+ email: request.params['email']
94
+ }.compact
92
95
 
93
- raise StandardError if @request_domain.nil?
96
+ raise StandardError if @user_param.nil?
94
97
 
95
- @request_domain
98
+ @user_param
96
99
  end
97
100
  end
98
101
  end
@@ -19,4 +19,5 @@ Gem::Specification.new do |gem|
19
19
  gem.name = 'omniauth-osso'
20
20
  gem.require_paths = ['lib']
21
21
  gem.version = OmniAuth::Osso::VERSION
22
+ gem.required_ruby_version = '~> 2.4'
22
23
  end
@@ -70,14 +70,14 @@ describe OmniAuth::Strategies::Osso do
70
70
  expect(instance.request_params[:domain]).to eq('example.com')
71
71
  end
72
72
 
73
- it 'includes domain when an email address is passed as an authorize option' do
73
+ it 'includes email when an email address is passed as an authorize option' do
74
74
  instance = subject.new('abc', 'def')
75
75
 
76
76
  allow(instance).to receive(:request) do
77
77
  double('Request', params: { 'email' => 'user@example.com' }, scheme: 'https', url: url)
78
78
  end
79
79
 
80
- expect(instance.request_params[:domain]).to eq('example.com')
80
+ expect(instance.request_params[:email]).to eq('user@example.com')
81
81
  end
82
82
  end
83
83
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-osso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Bauch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-17 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -51,6 +51,8 @@ files:
51
51
  - ".buildkite/hooks/environment"
52
52
  - ".buildkite/hooks/pre-command"
53
53
  - ".buildkite/pipeline.yml"
54
+ - ".github/dependabot.yml"
55
+ - ".github/workflows/automerge.yml"
54
56
  - ".gitignore"
55
57
  - ".rspec"
56
58
  - ".rubocop.yml"
@@ -79,9 +81,9 @@ require_paths:
79
81
  - lib
80
82
  required_ruby_version: !ruby/object:Gem::Requirement
81
83
  requirements:
82
- - - ">="
84
+ - - "~>"
83
85
  - !ruby/object:Gem::Version
84
- version: '0'
86
+ version: '2.4'
85
87
  required_rubygems_version: !ruby/object:Gem::Requirement
86
88
  requirements:
87
89
  - - ">="