omniauth-nextcloud 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/omniauth/nextcloud/version.rb +1 -1
- data/lib/omniauth/strategies/nextcloud.rb +13 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1311dd4e0d9237de153bad4b0396602fb2702c54a22017e389d3609e3917e82a
|
4
|
+
data.tar.gz: 85117f5dcb02df9439c9072e58c38717e3a1f7e996e8cc4a635c3f2169f0ec6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c786e179a8b614c06598b17095ef4823f12bd5fcdcb8eebbae8e1e007c2b25941d4d082f3af5ac1084a8a23dcb03e4be9151f0deabfdc3f24a1f9316784da252
|
7
|
+
data.tar.gz: 2dd7ac856c6d88ed85e9c52a95f872febc2da1afb1bc9503c5c219be6d4cd925b92770f04e22c09ff12a6e51e489f0ca1f731eb4e28a6f846f855d6223a0a0e5
|
data/Gemfile.lock
CHANGED
@@ -9,9 +9,21 @@ module OmniAuth
|
|
9
9
|
# Give your strategy a name.
|
10
10
|
option :name, :nextcloud
|
11
11
|
|
12
|
+
option :site_url, nil
|
13
|
+
|
12
14
|
# This is where you pass the options you would pass when
|
13
15
|
# initializing your consumer from the OAuth gem.
|
14
|
-
option :client_options
|
16
|
+
option :client_options, {}
|
17
|
+
|
18
|
+
def client
|
19
|
+
overrides = options.client_options
|
20
|
+
client_options = {
|
21
|
+
site: overrides.site || "#{options.site_url}/index.php/apps/oauth2",
|
22
|
+
authorize_url: overrides.authorize_url || "#{options.site_url}/index.php/apps/oauth2/authorize",
|
23
|
+
token_url: overrides.token_url || "#{options.site_url}/index.php/apps/oauth2/api/v1/token"
|
24
|
+
}
|
25
|
+
::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(client_options))
|
26
|
+
end
|
15
27
|
|
16
28
|
# You may specify that your strategy should use PKCE by setting
|
17
29
|
# the pkce option to true: https://tools.ietf.org/html/rfc7636
|