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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92505ba427615586184769bfcb3725c285462071876067e9f2e7e6142bbbee65
4
- data.tar.gz: d989f62becf683f50546505e1ad18e3bcec37e33630884cdde808428c8640506
3
+ metadata.gz: 1311dd4e0d9237de153bad4b0396602fb2702c54a22017e389d3609e3917e82a
4
+ data.tar.gz: 85117f5dcb02df9439c9072e58c38717e3a1f7e996e8cc4a635c3f2169f0ec6c
5
5
  SHA512:
6
- metadata.gz: 253e0d3904027bf6816bb4a86d29b741e8007d46e69f1bd461844c2f85837bb9ad7d04612ef79e57bd7f33a3693e65e634730bd79d5226c672bb382faefee5cb
7
- data.tar.gz: b96413de88eca9f8f8dcc0c4f4b89f9b121cf0fcb8acca0e25c38573e6b408d72bde5e433e503aa10b00abfcc477b8ae3758a82fd6df0dd4c685b5be31fb33f5
6
+ metadata.gz: c786e179a8b614c06598b17095ef4823f12bd5fcdcb8eebbae8e1e007c2b25941d4d082f3af5ac1084a8a23dcb03e4be9151f0deabfdc3f24a1f9316784da252
7
+ data.tar.gz: 2dd7ac856c6d88ed85e9c52a95f872febc2da1afb1bc9503c5c219be6d4cd925b92770f04e22c09ff12a6e51e489f0ca1f731eb4e28a6f846f855d6223a0a0e5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-nextcloud (0.1.0)
4
+ omniauth-nextcloud (0.2.0)
5
5
  omniauth (= 2.0.4)
6
6
  omniauth-oauth2 (= 1.7.1)
7
7
  rexml (= 3.2.5)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module Nextcloud
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-nextcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker