gamora 0.11.0 → 0.12.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42990c52c0cce68d2464f8479c8de617b42c11475971194b15874ee570fefc5
|
4
|
+
data.tar.gz: d03c696925417027a34bf19b9cf9f9c40a00e625a2f7bf14d59d01a31158747e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f03be26d3851c500561b50903bbc03475608822c69f21024fc4f969231b149049a2c3711ab4c234071a2f956efe01a5a9779a7bd105173cadad0e52dc998e119
|
7
|
+
data.tar.gz: 6177e2b7e04290502fb6395d29be8389e5ee6e743aeecf6e23efc401cce42e743aa6f88a140deb0e92190f0444b2272776269044e7ed3b52a693279b16fd400a
|
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
module Gamora
|
4
4
|
module AuthorizationUrl
|
5
|
+
ALLOWED_PARAMS = %i[
|
6
|
+
scope
|
7
|
+
state
|
8
|
+
theme
|
9
|
+
prompt
|
10
|
+
max_age
|
11
|
+
strategy
|
12
|
+
branding
|
13
|
+
ui_locales
|
14
|
+
allow_create
|
15
|
+
].freeze
|
16
|
+
|
5
17
|
def authorization_url(params, extra_params = {})
|
6
18
|
data =
|
7
19
|
default_params
|
@@ -21,21 +33,13 @@ module Gamora
|
|
21
33
|
prompt: Configuration.default_prompt,
|
22
34
|
strategy: Configuration.default_strategy,
|
23
35
|
branding: Configuration.default_branding,
|
24
|
-
ui_locales: Configuration.ui_locales.call
|
36
|
+
ui_locales: Configuration.ui_locales.call,
|
37
|
+
allow_create: Configuration.allow_create
|
25
38
|
}
|
26
39
|
end
|
27
40
|
|
28
41
|
def authorization_params(params)
|
29
|
-
params.permit(
|
30
|
-
:scope,
|
31
|
-
:state,
|
32
|
-
:theme,
|
33
|
-
:prompt,
|
34
|
-
:max_age,
|
35
|
-
:strategy,
|
36
|
-
:branding,
|
37
|
-
:ui_locales
|
38
|
-
)
|
42
|
+
params.permit(*ALLOWED_PARAMS)
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
data/lib/gamora/configuration.rb
CHANGED
@@ -17,6 +17,7 @@ module Gamora
|
|
17
17
|
mattr_accessor :default_branding, default: "amco"
|
18
18
|
mattr_accessor :default_theme, default: "default"
|
19
19
|
mattr_accessor :ui_locales, default: -> { I18n.locale }
|
20
|
+
mattr_accessor :allow_create, default: true
|
20
21
|
mattr_accessor :userinfo_cache_expires_in, default: 1.minute
|
21
22
|
mattr_accessor :introspect_cache_expires_in, default: 0.seconds
|
22
23
|
|
data/lib/gamora/version.rb
CHANGED
@@ -19,6 +19,7 @@ Gamora.setup do |config|
|
|
19
19
|
# config.default_branding = "amco"
|
20
20
|
# config.default_theme = "default"
|
21
21
|
# config.ui_locales = -> { I18n.locale }
|
22
|
+
# config.allow_create = true
|
22
23
|
# config.userinfo_cache_expires_in = 1.minute
|
23
24
|
# config.introspect_cache_expires_in = 0.seconds
|
24
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Gutiérrez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|