rails-auth 1.1.0 → 1.2.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
  SHA1:
3
- metadata.gz: fe64cc61d2ee90c0108495d16f8ddb385c26caf2
4
- data.tar.gz: 49f2318348eac65b42d60875028047bdcfe3a555
3
+ metadata.gz: e92a07d5339d2ad6e64b821ba2e1b4026de10c31
4
+ data.tar.gz: aaac5ccbcf152561ad1e1f682d06f02ecd9f6bb8
5
5
  SHA512:
6
- metadata.gz: 0a99e56a462666b4c6140e03f5066a6ba43b5e9707742300dc1ddcb9478b61380268d5ea604cb1cc06aaa6da34a7ae969cd22f75b85f656414bbea46f4063b13
7
- data.tar.gz: eb25fca0e6a870093bc7d638fecb214594d0d3c467b7b50400c43b2dbdb1cb3e96612b7cfe9aac0c0e0656e178d094f3356923c2a157f5fca47bf7f4e75f9be5
6
+ metadata.gz: 49a8941a641613a737835bba767ae859afeeed873c6de7034a3ca9d644ee784900fc5bda5f99e2f8d2382c4a86c47087d497f2add7ad0f6b1f38275c3d1cafe4
7
+ data.tar.gz: 4fc77b8fc2b2200766c8277658a78d790e6acbe1b3b3172fe82b5c18b23c41c732e5e24e3c7007490d9fa6688a30d32db221f7efefe40c224c87d13c58c92ebc
data/CHANGES.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### 1.2.0 (2016-07-11)
2
+
3
+ * [#28](https://github.com/square/rails-auth/pull/28)
4
+ Add a attr_reader for Rails::Auth::ACL#resources.
5
+ ([@tarcieri])
6
+
7
+ * [#27](https://github.com/square/rails-auth/pull/27)
8
+ Handle javax.servlet.request.X509Certificate arrays.
9
+ ([@tarcieri])
10
+
1
11
  ### 1.1.0 (2016-06-23)
2
12
 
3
13
  * [#26](https://github.com/square/rails-auth/pull/26)
data/Gemfile CHANGED
@@ -5,6 +5,10 @@ group :development do
5
5
  end
6
6
 
7
7
  group :development, :test do
8
+ # Workaround for: https://github.com/bundler/bundler/pull/4650
9
+ gem "rack", "~> 1.x"
10
+ gem "activesupport", "~> 4"
11
+
8
12
  gem "rake"
9
13
  gem "rspec"
10
14
  gem "rubocop", "0.38.0"
@@ -5,6 +5,8 @@ module Rails
5
5
  module Auth
6
6
  # Route-based access control lists
7
7
  class ACL
8
+ attr_reader :resources
9
+
8
10
  # Predicate matchers available by default in ACLs
9
11
  DEFAULT_MATCHERS = {
10
12
  allow_all: Matchers::AllowAll
@@ -3,6 +3,6 @@
3
3
  module Rails
4
4
  # Pluggable authentication and authorization for Rack/Rails
5
5
  module Auth
6
- VERSION = "1.1.0".freeze
6
+ VERSION = "1.2.0".freeze
7
7
  end
8
8
  end
@@ -7,8 +7,9 @@ module Rails
7
7
  module Filter
8
8
  # Extract OpenSSL::X509::Certificates from Java's sun.security.x509.X509CertImpl
9
9
  class Java
10
- def call(cert)
11
- OpenSSL::X509::Certificate.new(extract_der(cert)).freeze
10
+ def call(certs)
11
+ return unless certs
12
+ OpenSSL::X509::Certificate.new(extract_der(certs[0])).freeze
12
13
  end
13
14
 
14
15
  private
@@ -48,7 +48,7 @@ RSpec.describe Rails::Auth::X509::Middleware do
48
48
  it "extracts Rails::Auth::Credential::X509 from a Java::SunSecurityX509::X509CertImpl" do
49
49
  skip "JRuby only" unless defined?(JRUBY_VERSION)
50
50
 
51
- _response, env = middleware.call(request.merge(example_key => java_cert))
51
+ _response, env = middleware.call(request.merge(example_key => [java_cert]))
52
52
 
53
53
  credential = Rails::Auth.credentials(env).fetch("x509")
54
54
  expect(credential).to be_a Rails::Auth::X509::Certificate
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -144,4 +144,3 @@ signing_key:
144
144
  specification_version: 4
145
145
  summary: Modular resource-oriented authentication and authorization for Rails/Rack
146
146
  test_files: []
147
- has_rdoc: