spid 0.6.0 → 0.7.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: 56bb160d25e7ec4b209d932f65efc2dbc2f0ce29cb888e9af2f20fbf6ec2b9be
4
- data.tar.gz: e754ff7caf5732c27fc79941e48ae978891439e7ddaa8184ad68eea1580e0d5a
3
+ metadata.gz: 5a115dcdaeda82006ef3ffa4203bf6d4635d0a15e8b435f39429516f7cc931e7
4
+ data.tar.gz: bcb065ec6ea653a8745680ef8805bb756deef2410d56aa91ce9b24a51673b851
5
5
  SHA512:
6
- metadata.gz: '0818e90142286b6c1b9e8ebdda459707c360a3678a3ed19b9f8c6e84a3252d3a89001aed6bfdb9b4c2176a65ab823a81e2e15be97a12acdd7764f8e086fff863'
7
- data.tar.gz: d31f37207e05f2021b12440a64dfa3193704d11ab1f138ae07369bdfc07cf051df215c6c6452569d1c1a509a99f3bafda6162cf0d5f8483e5e47ed819d9b8573
6
+ metadata.gz: c731db6ddea64286e5543a07aee532eedaad1d0df79ca9b7b03555ba5e34864a17fa6ed9f81dc35ed21e7526acf41b6847e2476164edd147468008935f136772
7
+ data.tar.gz: 813bd1abdc555ce0d54c9376d06d7b3e31e0908296ec343691e4ef8f7a08c4fa8d04fc0fdec8d7f1d6ecd4b6b8918c7ac6c890291ace8adec4348b099d6090ad
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.0] - 2018-07-18
6
+ ### Added
7
+ - SloResponse class in order to validate saml response
8
+
5
9
  ## [0.6.0] - 2018-07-18
6
10
  ### Added
7
11
  - Slo Settings and SloRequest class
@@ -52,7 +56,8 @@
52
56
  - Coveralls Integration
53
57
  - Rubygems version badge in README
54
58
 
55
- [Unreleased]: https://github.com/italia/spid-ruby/compare/v0.6.0...HEAD
59
+ [Unreleased]: https://github.com/italia/spid-ruby/compare/v0.7.0...HEAD
60
+ [0.7.0]: https://github.com/italia/spid-ruby/compare/v0.6.0...v0.7.0
56
61
  [0.6.0]: https://github.com/italia/spid-ruby/compare/v0.5.0...v0.6.0
57
62
  [0.5.0]: https://github.com/italia/spid-ruby/compare/v0.4.0...v0.5.0
58
63
  [0.4.0]: https://github.com/italia/spid-ruby/compare/v0.3.1...v0.4.0
data/lib/spid.rb CHANGED
@@ -5,6 +5,7 @@ require "spid/logout_request"
5
5
  require "spid/sso_request"
6
6
  require "spid/sso_response"
7
7
  require "spid/slo_request"
8
+ require "spid/slo_response"
8
9
  require "spid/identity_providers"
9
10
  require "spid/metadata"
10
11
  require "spid/idp_metadata"
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "onelogin/ruby-saml/logoutresponse"
4
+
5
+ module Spid
6
+ class SloResponse # :nodoc:
7
+ attr_reader :body, :slo_settings
8
+
9
+ def initialize(body:, slo_settings:)
10
+ @body = body
11
+ @slo_settings = slo_settings
12
+ end
13
+
14
+ def valid?
15
+ saml_response.validate
16
+ end
17
+
18
+ private
19
+
20
+ def saml_response
21
+ @saml_response ||= ::OneLogin::RubySaml::Logoutresponse.new(
22
+ body,
23
+ slo_settings
24
+ )
25
+ end
26
+ end
27
+ end
@@ -32,6 +32,7 @@ module Spid
32
32
  name_identifier_format: name_identifier_format_value,
33
33
  private_key: service_provider_configuration.private_key,
34
34
  certificate: service_provider_configuration.certificate,
35
+ idp_cert_fingerprint: identity_provider_configuration.cert_fingerprint,
35
36
  sessionindex: session_index,
36
37
  security: {
37
38
  logout_requests_signed: true,
data/lib/spid/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spid
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
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.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Librera
@@ -285,6 +285,7 @@ files:
285
285
  - lib/spid/metadata.rb
286
286
  - lib/spid/service_provider_configuration.rb
287
287
  - lib/spid/slo_request.rb
288
+ - lib/spid/slo_response.rb
288
289
  - lib/spid/slo_settings.rb
289
290
  - lib/spid/sso_request.rb
290
291
  - lib/spid/sso_response.rb