omniauth-nitro-id 0.1.1 → 1.0.0

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: d4d3e8c274665be7c83f34c25dbf04aa079f54192cbd30a59ef4b6243020d33d
4
- data.tar.gz: 964db9c5a01dd33f16cc8491b9aeaac22dd980fd09d25ee737953824b2fbcc21
3
+ metadata.gz: b3b09237f96562c54df18acc4a2974ee10c321d587bd2c0878865c30aa57a0ed
4
+ data.tar.gz: 7bf933d671741411f8184693d372ccddadc64d74158b8177eb7d7cc68bccf7a1
5
5
  SHA512:
6
- metadata.gz: b16e8610dd2aeea20d1cdbe80088d7fd95898863987ccab37d2ffaa4efbdc59c21d9443e4e341b3c58a58d55bf19e33160b1c072e54f766250d114d5fda60794
7
- data.tar.gz: 25a285b3e002a2dcbc096cc7c9c9ecfc45fdc6ef59c06acf923705676c06320f390dc8c82f0780b4b3b700bf23d3878fc866e9b610644901501f287f12783e2f
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module NitroId
5
- VERSION = "0.1.1"
5
+ VERSION = "1.0.0"
6
6
  end
7
7
  end
@@ -2,3 +2,4 @@
2
2
 
3
3
  require "omniauth/nitro_id/version"
4
4
  require "omniauth/strategies/nitro_id"
5
+ require "omniauth/strategies/tempo_id"
@@ -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
@@ -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 = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
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.1.1
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-07-08 00:00:00.000000000 Z
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.3.7
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: []