Hello community,

here is the log from the commit of package rubygem-rack-oauth2 for 
openSUSE:Factory checked in at 2018-12-04 20:57:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rack-oauth2 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-rack-oauth2.new.19453 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-rack-oauth2"

Tue Dec  4 20:57:07 2018 rev:7 rq:653708 version:1.9.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-rack-oauth2/rubygem-rack-oauth2.changes  
2018-07-18 22:52:11.367309176 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-rack-oauth2.new.19453/rubygem-rack-oauth2.changes
       2018-12-04 20:57:07.752666398 +0100
@@ -1,0 +2,6 @@
+Thu Nov 22 05:30:16 UTC 2018 - Stephan Kulow <[email protected]>
+
+- updated to version 1.9.3
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  rack-oauth2-1.9.2.gem

New:
----
  rack-oauth2-1.9.3.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-rack-oauth2.spec ++++++
--- /var/tmp/diff_new_pack.MnwsfB/_old  2018-12-04 20:57:08.076666041 +0100
+++ /var/tmp/diff_new_pack.MnwsfB/_new  2018-12-04 20:57:08.080666036 +0100
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-rack-oauth2
-Version:        1.9.2
+Version:        1.9.3
 Release:        0
 %define mod_name rack-oauth2
 %define mod_full_name %{mod_name}-%{version}

++++++ rack-oauth2-1.9.2.gem -> rack-oauth2-1.9.3.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2018-04-27 12:00:23.000000000 +0200
+++ new/VERSION 2018-10-29 07:45:48.000000000 +0100
@@ -1 +1 @@
-1.9.2
\ No newline at end of file
+1.9.3
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rack/oauth2/access_token/bearer.rb 
new/lib/rack/oauth2/access_token/bearer.rb
--- old/lib/rack/oauth2/access_token/bearer.rb  2018-04-27 12:00:23.000000000 
+0200
+++ new/lib/rack/oauth2/access_token/bearer.rb  2018-10-29 07:45:48.000000000 
+0100
@@ -5,7 +5,14 @@
         def authenticate(request)
           request.header["Authorization"] = "Bearer #{access_token}"
         end
+
+        def to_mtls(attributes = {})
+          (required_attributes + optional_attributes).each do |key|
+            attributes[key] = self.send(key)
+          end
+          MTLS.new attributes
+        end
       end
     end
   end
-end
\ No newline at end of file
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rack/oauth2/access_token/mtls.rb 
new/lib/rack/oauth2/access_token/mtls.rb
--- old/lib/rack/oauth2/access_token/mtls.rb    1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rack/oauth2/access_token/mtls.rb    2018-10-29 07:45:48.000000000 
+0100
@@ -0,0 +1,16 @@
+module Rack
+  module OAuth2
+    class AccessToken
+      class MTLS < Bearer
+        attr_required :private_key, :certificate
+
+        def initialize(attributes = {})
+          super
+          self.token_type = :bearer
+          httpclient.ssl_config.client_key = private_key
+          httpclient.ssl_config.client_cert = certificate
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rack/oauth2/access_token.rb 
new/lib/rack/oauth2/access_token.rb
--- old/lib/rack/oauth2/access_token.rb 2018-04-27 12:00:23.000000000 +0200
+++ new/lib/rack/oauth2/access_token.rb 2018-10-29 07:45:48.000000000 +0100
@@ -38,3 +38,4 @@
 require 'rack/oauth2/access_token/bearer'
 require 'rack/oauth2/access_token/mac'
 require 'rack/oauth2/access_token/legacy'
+require 'rack/oauth2/access_token/mtls'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rack/oauth2/client.rb 
new/lib/rack/oauth2/client.rb
--- old/lib/rack/oauth2/client.rb       2018-04-27 12:00:23.000000000 +0200
+++ new/lib/rack/oauth2/client.rb       2018-10-29 07:45:48.000000000 +0100
@@ -3,7 +3,7 @@
     class Client
       include AttrRequired, AttrOptional
       attr_required :identifier
-      attr_optional :secret, :private_key, :redirect_uri, :scheme, :host, 
:port, :authorization_endpoint, :token_endpoint
+      attr_optional :secret, :private_key, :certificate, :redirect_uri, 
:scheme, :host, :port, :authorization_endpoint, :token_endpoint
 
       def initialize(attributes = {})
         (required_attributes + optional_attributes).each do |key|
@@ -70,6 +70,7 @@
 
       def access_token!(*args)
         headers, params = {}, @grant.as_json
+        http_client = Rack::OAuth2.http_client
 
         # NOTE:
         #  Using Array#estract_options! for backward compatibility.
@@ -106,6 +107,12 @@
           params.merge!(
             client_assertion_type: URN::ClientAssertionType::SAML2_BEARER
           )
+        when :mtls
+          params.merge!(
+            client_id: identifier
+          )
+          http_client.ssl_config.client_key = private_key
+          http_client.ssl_config.client_cert = certificate
         else
           params.merge!(
             client_id: identifier,
@@ -113,7 +120,7 @@
           )
         end
         handle_response do
-          Rack::OAuth2.http_client.post(
+          http_client.post(
             absolute_uri_for(token_endpoint),
             Util.compact_hash(params),
             headers
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2018-04-27 12:00:23.000000000 +0200
+++ new/metadata        2018-10-29 07:45:48.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: rack-oauth2
 version: !ruby/object:Gem::Version
-  version: 1.9.2
+  version: 1.9.3
 platform: ruby
 authors:
 - nov matake
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2018-04-27 00:00:00.000000000 Z
+date: 2018-10-29 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rack
@@ -177,6 +177,7 @@
 - lib/rack/oauth2/access_token/mac/sha256_hex_verifier.rb
 - lib/rack/oauth2/access_token/mac/signature.rb
 - lib/rack/oauth2/access_token/mac/verifier.rb
+- lib/rack/oauth2/access_token/mtls.rb
 - lib/rack/oauth2/client.rb
 - lib/rack/oauth2/client/error.rb
 - lib/rack/oauth2/client/grant.rb
@@ -301,7 +302,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.7.3
+rubygems_version: 2.7.6
 signing_key: 
 specification_version: 4
 summary: OAuth 2.0 Server & Client Library - Both Bearer and MAC token type 
are supported


Reply via email to