rodauth-oauth 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 366fa7201a8cb26525b2abdfab0c4108a4afbef4fa8697cf57e874919eda2afd
4
- data.tar.gz: 958b9fd8b4cd2996a85b96fac6dff6a6b35832adcdaed4d81e20842041a1299e
3
+ metadata.gz: d21e4fc67f961c41299cbd79176ed284729c5d4198dd38008edee29d455baaeb
4
+ data.tar.gz: 5274aa48c6192b7182764d762fb55a4d025aefef8ee85693b770c8ce691a0de2
5
5
  SHA512:
6
- metadata.gz: fb496f7d438c0447ba4ef899f9ec37549cea355fb5c670818cd040970c1316c13442caa58aebc4ea66cd92f2f369d6ff7c39b502190e2d4fec2f95d5e27b4279
7
- data.tar.gz: 73048d860285b29056ade97d9092103e2cae18fa9967df603ddce9c83c10fd5c44891e7282f3195d0b79b2d73bf12c748483a811f404d50fb29df40da26a6bf4
6
+ metadata.gz: 0aa9e79243f70753fd3741f21f862f0f8795b21eea16bba81319a18183a43027c344f099ab2b2663b84e30e7453cde33e9fceb4d015c32057b79fb4dc10a4680
7
+ data.tar.gz: d2dcb2edcca49fa0d9f29e321bd52cb26d40e466e10c1936a564925be9976051b9ef730a32e9a9fdc7fed9ba00778749ddc78fc9db60af227926285fc46fa285
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ### 0.6.0 (21/05/2021)
6
+
7
+ ### Improvements
8
+
9
+ * RBS signatures
10
+
11
+ ### Chore
12
+
13
+ * Ruby 3 and Truffleruby are now officially supported and tested in CI.
14
+
5
15
  ### 0.5.1 (19/03/2021)
6
16
 
7
17
  #### Improvements
data/README.md CHANGED
@@ -633,11 +633,11 @@ Although very handy for the mentioned use case, one can't revoke a JWT token on
633
633
 
634
634
  ## Ruby support policy
635
635
 
636
- The minimum Ruby version required to run `rodauth-oauth` is 2.3 . Besides that, it should support all rubies that rodauth and roda support, including JRuby and (potentially, I don't know yet) truffleruby.
636
+ The minimum Ruby version required to run `rodauth-oauth` is 2.3 . Besides that, it should support all rubies that rodauth and roda support, including JRuby and truffleruby.
637
637
 
638
- ### JRuby
638
+ ### Rails
639
639
 
640
- If you're interested in using this library in rails, be sure to check `rodauth-rails` policy, as it supports rails 5.2 upwards.
640
+ If you're interested in using this library with rails, be sure to check `rodauth-rails` policy, as it supports rails 5.2 upwards.
641
641
 
642
642
  ## Development
643
643
 
@@ -9,7 +9,7 @@ require "rodauth/oauth/ttl_store"
9
9
  require "rodauth/oauth/database_extensions"
10
10
 
11
11
  module Rodauth
12
- Feature.define(:oauth) do
12
+ Feature.define(:oauth, :Oauth) do
13
13
  # RUBY EXTENSIONS
14
14
  unless Regexp.method_defined?(:match?)
15
15
  # If you wonder why this is there: the oauth feature uses a refinement to enhance the
@@ -466,10 +466,6 @@ module Rodauth
466
466
  end
467
467
  end
468
468
 
469
- def initialize(scope)
470
- @scope = scope
471
- end
472
-
473
469
  def scopes
474
470
  scope = request.params["scope"]
475
471
  case scope
@@ -568,12 +564,11 @@ module Rodauth
568
564
  self.class.__send__(:include, Rodauth::OAuth::ExtendDatabase(db))
569
565
 
570
566
  # Check whether we can reutilize db entries for the same account / application pair
571
- one_oauth_token_per_account = begin
572
- db.indexes(oauth_tokens_table).values.any? do |definition|
573
- definition[:unique] &&
574
- definition[:columns] == oauth_tokens_unique_columns
575
- end
567
+ one_oauth_token_per_account = db.indexes(oauth_tokens_table).values.any? do |definition|
568
+ definition[:unique] &&
569
+ definition[:columns] == oauth_tokens_unique_columns
576
570
  end
571
+
577
572
  self.class.send(:define_method, :__one_oauth_token_per_account) { one_oauth_token_per_account }
578
573
  end
579
574
 
@@ -1,7 +1,7 @@
1
1
  # frozen-string-literal: true
2
2
 
3
3
  module Rodauth
4
- Feature.define(:oauth_http_mac) do
4
+ Feature.define(:oauth_http_mac, :OauthHttpMac) do
5
5
  unless String.method_defined?(:delete_prefix)
6
6
  module PrefixExtensions
7
7
  refine(String) do
@@ -3,7 +3,7 @@
3
3
  require "rodauth/oauth/ttl_store"
4
4
 
5
5
  module Rodauth
6
- Feature.define(:oauth_jwt) do
6
+ Feature.define(:oauth_jwt, :OauthJwt) do
7
7
  depends :oauth
8
8
 
9
9
  JWKS = OAuth::TtlStore.new
@@ -3,7 +3,7 @@
3
3
  require "onelogin/ruby-saml"
4
4
 
5
5
  module Rodauth
6
- Feature.define(:oauth_saml) do
6
+ Feature.define(:oauth_saml, :OauthSaml) do
7
7
  depends :oauth
8
8
 
9
9
  auth_value_method :oauth_saml_cert_fingerprint, "9E:65:2E:03:06:8D:80:F2:86:C7:6C:77:A1:D9:14:97:0A:4D:F4:4D"
@@ -1,7 +1,7 @@
1
1
  # frozen-string-literal: true
2
2
 
3
3
  module Rodauth
4
- Feature.define(:oidc) do
4
+ Feature.define(:oidc, :Oidc) do
5
5
  # https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
6
6
  OIDC_SCOPES_MAP = {
7
7
  "profile" => %i[name family_name given_name middle_name nickname preferred_username
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rodauth
4
4
  module OAuth
5
- VERSION = "0.5.1"
5
+ VERSION = "0.6.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Cardoso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-19 00:00:00.000000000 Z
11
+ date: 2021-05-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Implementation of the OAuth 2.0 protocol on top of rodauth.
14
14
  email:
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 3.2.3
74
+ rubygems_version: 3.2.15
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: Implementation of the OAuth 2.0 protocol on top of rodauth.