gamora 0.13.0 → 0.14.1

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: 5e104c740e37e365b1a0026c7cc35c4484bfe4e3546f2ecc7f29cdc2d983b1c8
4
- data.tar.gz: 4e5386d4a3d3cb3541c9d1b6c67ac648ea33bd0d088aa77c6b598a612e155501
3
+ metadata.gz: b86b5408e3b789413964ee3f2bda90e09a720f208e0fd0e8321e201bd4b7dbf3
4
+ data.tar.gz: f4ffab58834e0d101e429bedd2eda712eea88c4c249e32b5705292aac38da64a
5
5
  SHA512:
6
- metadata.gz: 3fe807fc7d017463448981f708a68f3e3a0ae6d61ae1985d794230af707cdf0d76e1da05f267afccbe564262273b520e70229548f9f06edafc7e2305573b3a6e
7
- data.tar.gz: 2827ef0787c8e7ccbf7462be3b921c7a82e699f35d91b48c34528db9526209ef34a9ca0aac32e180027ce6fb564cb65e9f37a3117916c787b5c99fa169d5e785
6
+ metadata.gz: 5645b009f2fd9547d3e1039c3997c21f7a2ea57bf9a11fdd71fbe38cb0ef7cb5e1bb2ce4e689bd908149252b7c4c12319787382c0587a09addd3f17b6c883aa3
7
+ data.tar.gz: 0b004457b47a11f2f45abbb87497fb1e91c5c46feb8b57a16765380903847177399dffb3d39f5b6fdc68fe5035d1ca602c90997a14d34a828fbd63f9ef244b6d
@@ -7,9 +7,11 @@ module Gamora
7
7
  before_action :authenticate_user!
8
8
 
9
9
  def show
10
- Configuration.authorization_method.call(current_user) ?
11
- render(json: { message: "Authorized user" }, status: :ok) :
12
- render(json: { error: "Unauthorized user" }, status: :forbidden)
10
+ if Configuration.authorization_method.call(current_user)
11
+ render json: { message: "Authorized user" }, status: :ok
12
+ else
13
+ render json: { error: "Unauthorized user" }, status: :forbidden
14
+ end
13
15
  end
14
16
  end
15
17
  end
@@ -12,6 +12,7 @@ module Gamora
12
12
  family_name: :last_name,
13
13
  phone_number: :phone_number,
14
14
  email_verified: :email_verified,
15
+ associated_user_id: :associated_user_id,
15
16
  phone_number_verified: :phone_number_verified
16
17
  }.freeze
17
18
 
@@ -20,7 +20,7 @@ module Gamora
20
20
  mattr_accessor :allow_create, default: true
21
21
  mattr_accessor :userinfo_cache_expires_in, default: 1.minute
22
22
  mattr_accessor :introspect_cache_expires_in, default: 0.seconds
23
- mattr_accessor :authorization_method, default: -> (user) { !!user }
23
+ mattr_accessor :authorization_method, default: ->(user) { user }
24
24
 
25
25
  def setup
26
26
  yield(self) if block_given?
data/lib/gamora/user.rb CHANGED
@@ -12,6 +12,7 @@ module Gamora
12
12
  :first_name,
13
13
  :phone_number,
14
14
  :email_verified,
15
+ :associated_user_id,
15
16
  :phone_number_verified
16
17
  end
17
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gamora
4
- VERSION = "0.13.0"
4
+ VERSION = "0.14.1"
5
5
  end
@@ -22,5 +22,5 @@ Gamora.setup do |config|
22
22
  # config.allow_create = true
23
23
  # config.userinfo_cache_expires_in = 1.minute
24
24
  # config.introspect_cache_expires_in = 0.seconds
25
- # config.authorization_method = -> (user) { user.authorized? }
25
+ # config.authorization_method = ->(user) { user.authorized? }
26
26
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alejandro Gutiérrez
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-09 00:00:00.000000000 Z
10
+ date: 2025-04-03 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: oauth2
@@ -55,7 +54,6 @@ files:
55
54
  - app/controllers/gamora/authorization_controller.rb
56
55
  - app/controllers/gamora/callback_controller.rb
57
56
  - app/controllers/gamora/unauthentication_controller.rb
58
- - app/models/gamora/application_record.rb
59
57
  - config/routes.rb
60
58
  - lib/gamora.rb
61
59
  - lib/gamora/authentication/base.rb
@@ -77,7 +75,6 @@ metadata:
77
75
  source_code_uri: https://github.com/amco/gamora-rb
78
76
  changelog_uri: https://github.com/amco/gamora-rb/blob/main/CHANGELOG.md
79
77
  rubygems_mfa_required: 'true'
80
- post_install_message:
81
78
  rdoc_options: []
82
79
  require_paths:
83
80
  - lib
@@ -92,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
89
  - !ruby/object:Gem::Version
93
90
  version: '0'
94
91
  requirements: []
95
- rubygems_version: 3.5.11
96
- signing_key:
92
+ rubygems_version: 3.6.2
97
93
  specification_version: 4
98
94
  summary: OpenID Connect Relying Party for rails apps.
99
95
  test_files: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Gamora
4
- class ApplicationRecord < ActiveRecord::Base
5
- self.abstract_class = true
6
- end
7
- end