rodauth-oauth 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +3 -3
- data/lib/rodauth/features/oauth.rb +5 -10
- data/lib/rodauth/features/oauth_http_mac.rb +1 -1
- data/lib/rodauth/features/oauth_jwt.rb +1 -1
- data/lib/rodauth/features/oauth_saml.rb +1 -1
- data/lib/rodauth/features/oidc.rb +1 -1
- data/lib/rodauth/oauth/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d21e4fc67f961c41299cbd79176ed284729c5d4198dd38008edee29d455baaeb
|
4
|
+
data.tar.gz: 5274aa48c6192b7182764d762fb55a4d025aefef8ee85693b770c8ce691a0de2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0aa9e79243f70753fd3741f21f862f0f8795b21eea16bba81319a18183a43027c344f099ab2b2663b84e30e7453cde33e9fceb4d015c32057b79fb4dc10a4680
|
7
|
+
data.tar.gz: d2dcb2edcca49fa0d9f29e321bd52cb26d40e466e10c1936a564925be9976051b9ef730a32e9a9fdc7fed9ba00778749ddc78fc9db60af227926285fc46fa285
|
data/CHANGELOG.md
CHANGED
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
|
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
|
-
###
|
638
|
+
### Rails
|
639
639
|
|
640
|
-
If you're interested in using this library
|
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 =
|
572
|
-
|
573
|
-
definition[:
|
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(: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
|
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.
|
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-
|
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.
|
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.
|