rack-saml 0.1.5 → 0.2.1

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
  SHA1:
3
- metadata.gz: a4c33c58e09628a99756360f97a6d263c149d53e
4
- data.tar.gz: fda12a53fcaeed6d34a76123840aee1c8ce1a6ec
3
+ metadata.gz: 0eb365c0ed8e0106e26d6955e07d660180cdf2fa
4
+ data.tar.gz: ad5c44db48bde5199d184befc195e4b29a211b8e
5
5
  SHA512:
6
- metadata.gz: 2847e6b08406ff442e71531e0adccfa1e70cfd0a12d25725185441192bb49f77548d4bfafe9b54a474f4fb15a75f3729db1625b01114569c8b8ceccf2917f775
7
- data.tar.gz: 20209990dbded49dae09a38f8d7fb24538951661f09611b7e5531352f3f2e0a0cd0b95058a9b2cea7d8ff4befcf4a188a84a6b6339d39bd262d2dc26504bff9c
6
+ metadata.gz: 5372825df2ffe6c2a55c95015dcc17cbca21ca9d59f2e43fbadbc95e3750e00f660b464c36e79b36dfee9d29edb8eebc4c6caeb96e1d10153ea7c80378586bab
7
+ data.tar.gz: 52807a0ff2956f553d175bbef372c40efbe308e18e923a07426f514816336e0d4837e03236995b1973b99cd4e3390a2939120e52880e3f5f5f7ea82d356725c7
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ before_install:
2
+ - gem update --system
3
+ - gem update bundler
data/config/rack-saml.yml CHANGED
@@ -7,3 +7,5 @@ shib_app_id: default
7
7
  shibb_ds: https://localhost/discovery/WAYF
8
8
  allowed_clock_drift: 60
9
9
  validation_error: true
10
+ sp_cert: config/cert/development_cert.pem
11
+ sp_key: config/cert/development_key.pem
@@ -7,6 +7,16 @@ module Rack
7
7
  settings = OneLogin::RubySaml::Settings.new
8
8
  settings.assertion_consumer_service_url = @config['assertion_consumer_service_uri']
9
9
  settings.issuer = @config['saml_sp']
10
+ if ENV['SP_CERT']
11
+ settings.certificate = ENV['SP_CERT']
12
+ elsif @config['sp_cert']
13
+ settings.certificate = IO::File.open(@config['sp_cert'], 'r').read
14
+ end
15
+ if ENV['SP_KEY']
16
+ settings.private_key = ENV['SP_KEY']
17
+ elsif @config['sp_key']
18
+ settings.private_key = IO::File.open(@config['sp_key'], 'r').read
19
+ end
10
20
  settings.idp_sso_target_url = @metadata['saml2_http_redirect']
11
21
  settings.idp_cert = @metadata['certificate']
12
22
  settings.name_identifier_format = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
@@ -9,9 +9,9 @@ module Rack
9
9
  def initialize(request, config, metadata)
10
10
  super(request, config, metadata)
11
11
  @response = OneLogin::RubySaml::Response.new(@request.params['SAMLResponse'], {
12
- :allowed_clock_drift => config['allowed_clock_drift']
12
+ :allowed_clock_drift => config['allowed_clock_drift'],
13
+ :settings => saml_settings
13
14
  })
14
- @response.settings = saml_settings
15
15
  end
16
16
 
17
17
  def is_valid?
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Saml
3
- VERSION = "0.1.5"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
data/rack-saml.gemspec CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/rack-saml/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.add_dependency 'rack'
6
- gem.add_dependency 'ruby-saml', '~> 1.0.0'
6
+ gem.add_dependency 'ruby-saml', '~> 1.1.2'
7
7
  gem.add_development_dependency 'rack-test'
8
8
  gem.add_development_dependency 'rake'
9
9
  gem.add_development_dependency 'rspec'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-saml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toyokazu Akiyama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-20 00:00:00.000000000 Z
11
+ date: 2016-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: 1.1.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: 1.1.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack-test
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -87,6 +87,7 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".travis.yml"
90
91
  - Gemfile
91
92
  - Gemfile.lock
92
93
  - README.md
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
134
  version: '0'
134
135
  requirements: []
135
136
  rubyforge_project:
136
- rubygems_version: 2.4.5
137
+ rubygems_version: 2.4.5.1
137
138
  signing_key:
138
139
  specification_version: 4
139
140
  summary: SAML middleware for Rack (using ruby-saml)