omniauth-nitro-id 0.1.1 → 1.0.0
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 +4 -4
- data/docs/CHANGELOG.md +17 -0
- data/lib/omniauth/nitro_id/version.rb +1 -1
- data/lib/omniauth/nitro_id.rb +1 -0
- data/lib/omniauth/strategies/tempo_id.rb +18 -0
- data/omniauth-nitro-id.gemspec +1 -1
- data/spec/omniauth/strategies/tempo_id_spec.rb +55 -0
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3b09237f96562c54df18acc4a2974ee10c321d587bd2c0878865c30aa57a0ed
|
4
|
+
data.tar.gz: 7bf933d671741411f8184693d372ccddadc64d74158b8177eb7d7cc68bccf7a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba8f9dcf267a4c63ba805f7fa7cca57e798534b070cd81fd40890a3b7f0b475a142a4f626bf8c93e78ce18ae54d227fc5187e98415bf1a516d16e58832813192
|
7
|
+
data.tar.gz: 43bf42fcd09e559514a7e16376d0f9b5c2686eb67119daeaaf7620094464acbdb891e0cad2cbd268749653d473bf7292f61b8e0bd39933d400a8dcdcf3f8ab0d
|
data/docs/CHANGELOG.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [Unreleased]
|
9
|
+
|
10
|
+
## [1.0.0] - 2022-12-05
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
* Initial release
|
15
|
+
|
16
|
+
[Unreleased]: https://github.com/powerhome/omniauth-nitro-id/compare/v1.0.0...HEAD
|
17
|
+
[1.0.0]: https://github.com/powerhome/omniauth-nitro-id/releases/tag/v1.0.0
|
data/lib/omniauth/nitro_id.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "omniauth_openid_connect"
|
4
|
+
|
5
|
+
module OmniAuth
|
6
|
+
module Strategies
|
7
|
+
class TempoId < OmniAuth::Strategies::OpenIDConnect
|
8
|
+
DEFAULT_STRATEGY_NAME = "tempo_id"
|
9
|
+
DEFAULT_ISSUER = "https://id.streamfinancial.io/"
|
10
|
+
DEFAULT_HOST = "id.streamfinancial.io"
|
11
|
+
|
12
|
+
option :name, DEFAULT_STRATEGY_NAME
|
13
|
+
option :discovery, true
|
14
|
+
option :issuer, DEFAULT_ISSUER
|
15
|
+
option :client_options, host: DEFAULT_HOST
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/omniauth-nitro-id.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.required_ruby_version = ">= 2.7.0"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split("\n")
|
17
|
-
spec.executables =
|
17
|
+
spec.executables = []
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "omniauth_openid_connect", "~> 0.4.0"
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
describe OmniAuth::Strategies::TempoId do
|
6
|
+
let(:access_token) { instance_double("AccessToken", :options => {}, :[] => "user") }
|
7
|
+
let(:custom_client) do
|
8
|
+
OmniAuth::Strategies::TempoId.new(:test_app,
|
9
|
+
issuer: "https://example-host.com/",
|
10
|
+
discovery: false,
|
11
|
+
client_options: {
|
12
|
+
host: "example-host.com",
|
13
|
+
})
|
14
|
+
end
|
15
|
+
|
16
|
+
subject do
|
17
|
+
OmniAuth::Strategies::TempoId.new({})
|
18
|
+
end
|
19
|
+
|
20
|
+
before(:each) do
|
21
|
+
allow(subject).to receive(:access_token).and_return(access_token)
|
22
|
+
end
|
23
|
+
|
24
|
+
context "options" do
|
25
|
+
it "should have correct name" do
|
26
|
+
expect(subject.options.name).to eq "tempo_id"
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should have correct host" do
|
30
|
+
expect(subject.options.client_options.host).to eq "id.streamfinancial.io"
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should have correct issuer" do
|
34
|
+
expect(subject.options.issuer).to eq "https://id.streamfinancial.io/"
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should have the correct discovery setting" do
|
38
|
+
expect(subject.options.discovery).to eq true
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "should be overrideable" do
|
42
|
+
it "for host" do
|
43
|
+
expect(custom_client.options.client_options.host).to eq "example-host.com"
|
44
|
+
end
|
45
|
+
|
46
|
+
it "for issuer" do
|
47
|
+
expect(custom_client.options.issuer).to eq "https://example-host.com/"
|
48
|
+
end
|
49
|
+
|
50
|
+
it "for discovery" do
|
51
|
+
expect(custom_client.options.discovery).to eq false
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-nitro-id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Greer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth_openid_connect
|
@@ -139,9 +139,7 @@ dependencies:
|
|
139
139
|
description: NitroID Strategy for OmniAuth.
|
140
140
|
email:
|
141
141
|
- stephen.greer@powerhrg.com
|
142
|
-
executables:
|
143
|
-
- console
|
144
|
-
- setup
|
142
|
+
executables: []
|
145
143
|
extensions: []
|
146
144
|
extra_rdoc_files: []
|
147
145
|
files:
|
@@ -156,22 +154,25 @@ files:
|
|
156
154
|
- Rakefile
|
157
155
|
- bin/console
|
158
156
|
- bin/setup
|
157
|
+
- docs/CHANGELOG.md
|
159
158
|
- docs/README.md
|
160
159
|
- lib/omniauth-nitro-id.rb
|
161
160
|
- lib/omniauth/nitro_id.rb
|
162
161
|
- lib/omniauth/nitro_id/version.rb
|
163
162
|
- lib/omniauth/strategies/nitro_id.rb
|
163
|
+
- lib/omniauth/strategies/tempo_id.rb
|
164
164
|
- mkdocs.yml
|
165
165
|
- omniauth-nitro-id.gemspec
|
166
166
|
- portal.yml
|
167
167
|
- renovate.json
|
168
168
|
- spec/omniauth/strategies/nitro_id_spec.rb
|
169
|
+
- spec/omniauth/strategies/tempo_id_spec.rb
|
169
170
|
- spec/spec_helper.rb
|
170
171
|
homepage: https://github.com/powerhome/omniauth-nitro-id
|
171
172
|
licenses:
|
172
173
|
- MIT
|
173
174
|
metadata: {}
|
174
|
-
post_install_message:
|
175
|
+
post_install_message:
|
175
176
|
rdoc_options: []
|
176
177
|
require_paths:
|
177
178
|
- lib
|
@@ -186,8 +187,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
187
|
- !ruby/object:Gem::Version
|
187
188
|
version: '0'
|
188
189
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
190
|
-
signing_key:
|
190
|
+
rubygems_version: 3.1.6
|
191
|
+
signing_key:
|
191
192
|
specification_version: 4
|
192
193
|
summary: NitroID Strategy for OmniAuth.
|
193
194
|
test_files: []
|