spid 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/spid/sso/request.rb +2 -4
- data/lib/spid/sso/settings.rb +3 -15
- data/lib/spid/version.rb +1 -1
- data/spid.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2549dafdd51acab9539c94dda0bc1340ec6d68931dc3ccf7a422e8398dee397f
|
4
|
+
data.tar.gz: ec855618444a7d613867e80fc76af1b2ffb769622a9e1aa500cd01c2dabf422d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18c6c8c07b64cbb28e300dc73c4fe0441528b118ef8cb58b9573e3211f8e6c4d94378da5fab36dc60c4d9bdb68f7360b2f7090fb7ba5dc5defadb61e5cf7e91
|
7
|
+
data.tar.gz: a823aeb5b71c98ed8324a8ff74e573b7e2b1a44f975ee238569cb0f5a8c9277ed2513c101d314e96b257c61f488b55fd513df1eb9dfca83a344a66caf3064963
|
data/CHANGELOG.md
CHANGED
data/lib/spid/sso/request.rb
CHANGED
@@ -10,10 +10,9 @@ module Spid
|
|
10
10
|
attr_reader :authn_context
|
11
11
|
attr_reader :authn_context_comparison
|
12
12
|
|
13
|
-
def initialize(idp_name:, authn_context
|
13
|
+
def initialize(idp_name:, authn_context:)
|
14
14
|
@idp_name = idp_name
|
15
15
|
@authn_context = authn_context
|
16
|
-
@authn_context_comparison = authn_context_comparison
|
17
16
|
end
|
18
17
|
|
19
18
|
def to_saml
|
@@ -28,8 +27,7 @@ module Spid
|
|
28
27
|
Settings.new(
|
29
28
|
service_provider: service_provider,
|
30
29
|
identity_provider: identity_provider,
|
31
|
-
authn_context: authn_context
|
32
|
-
authn_context_comparison: authn_context_comparison
|
30
|
+
authn_context: authn_context
|
33
31
|
)
|
34
32
|
end
|
35
33
|
|
data/lib/spid/sso/settings.rb
CHANGED
@@ -5,15 +5,11 @@ module Spid
|
|
5
5
|
class Settings # :nodoc:
|
6
6
|
attr_reader :service_provider,
|
7
7
|
:identity_provider,
|
8
|
-
:authn_context
|
9
|
-
:authn_context_comparison
|
10
|
-
|
11
|
-
# rubocop:disable Metrics/MethodLength
|
8
|
+
:authn_context
|
12
9
|
def initialize(
|
13
10
|
service_provider:,
|
14
11
|
identity_provider:,
|
15
|
-
authn_context: Spid::L1
|
16
|
-
authn_context_comparison: Spid::EXACT_COMPARISON
|
12
|
+
authn_context: Spid::L1
|
17
13
|
)
|
18
14
|
|
19
15
|
unless AUTHN_CONTEXTS.include?(authn_context)
|
@@ -22,18 +18,10 @@ module Spid
|
|
22
18
|
" use one of #{AUTHN_CONTEXTS.join(', ')}"
|
23
19
|
end
|
24
20
|
|
25
|
-
unless COMPARISON_METHODS.include?(authn_context_comparison)
|
26
|
-
raise Spid::UnknownAuthnComparisonMethodError,
|
27
|
-
"Provided authn_context_comparison_method is not valid:" \
|
28
|
-
" use one of #{COMPARISON_METHODS.join(', ')}"
|
29
|
-
end
|
30
|
-
|
31
21
|
@service_provider = service_provider
|
32
22
|
@identity_provider = identity_provider
|
33
23
|
@authn_context = authn_context
|
34
|
-
@authn_context_comparison = authn_context_comparison
|
35
24
|
end
|
36
|
-
# rubocop:enable Metrics/MethodLength
|
37
25
|
|
38
26
|
def saml_settings
|
39
27
|
::OneLogin::RubySaml::Settings.new(sso_attributes)
|
@@ -53,7 +41,7 @@ module Spid
|
|
53
41
|
protocol_binding: protocol_binding_value,
|
54
42
|
name_identifier_format: name_identifier_format_value,
|
55
43
|
authn_context: authn_context,
|
56
|
-
authn_context_comparison:
|
44
|
+
authn_context_comparison: Spid::MINIMUM_COMPARISON
|
57
45
|
}
|
58
46
|
end
|
59
47
|
|
data/lib/spid/version.rb
CHANGED
data/spid.gemspec
CHANGED
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = ">= 2.3.0"
|
26
26
|
|
27
27
|
spec.add_runtime_dependency "ruby-saml", "~> 1.8", ">= 1.8.0"
|
28
|
+
spec.add_dependency "activesupport", ">= 3.0.0"
|
28
29
|
|
29
|
-
spec.add_development_dependency "activesupport", ">= 3.0.0"
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.16"
|
31
31
|
spec.add_development_dependency "bundler-audit", "~> 0"
|
32
32
|
spec.add_development_dependency "coveralls", "~> 0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Librera
|
@@ -37,7 +37,7 @@ dependencies:
|
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 3.0.0
|
40
|
-
type: :
|
40
|
+
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|