omniauth-nextcloud 0.2.0 → 0.2.1

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: 1311dd4e0d9237de153bad4b0396602fb2702c54a22017e389d3609e3917e82a
4
- data.tar.gz: 85117f5dcb02df9439c9072e58c38717e3a1f7e996e8cc4a635c3f2169f0ec6c
3
+ metadata.gz: 32ad9eb5ce68f8f4a6eb3cb821808094e280872159e408b6c0716742e77048a9
4
+ data.tar.gz: 238bb3a4378047c8ae1113b0ca32dd037b18ff424d4e954e25922488bf944a52
5
5
  SHA512:
6
- metadata.gz: c786e179a8b614c06598b17095ef4823f12bd5fcdcb8eebbae8e1e007c2b25941d4d082f3af5ac1084a8a23dcb03e4be9151f0deabfdc3f24a1f9316784da252
7
- data.tar.gz: 2dd7ac856c6d88ed85e9c52a95f872febc2da1afb1bc9503c5c219be6d4cd925b92770f04e22c09ff12a6e51e489f0ca1f731eb4e28a6f846f855d6223a0a0e5
6
+ metadata.gz: f07b25d22ab934e8d7d0c4ebdcb1cf9a7d7b5366cbeda1ff36854b0a183fdb669b43dd4ef46a6627442f3e68e770a689d7d710045b0fa98502acaa1a4585656c
7
+ data.tar.gz: cd6a30c2c1a5e3bac6ccedd679638c73e695f4e7095b861d1a44cc3ed20095c7407a06f54e3d124ab52edff1534bd58301b4a826fab6e624dc2d39a987aacc54
data/.rubocop.yml CHANGED
@@ -1,5 +1,8 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.7
3
+ Exclude:
4
+ - 'spec/**/*.rb'
5
+
3
6
 
4
7
  Style/StringLiterals:
5
8
  Enabled: true
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-nextcloud (0.2.0)
4
+ omniauth-nextcloud (0.2.1)
5
5
  omniauth (= 2.0.4)
6
- omniauth-oauth2 (= 1.7.1)
6
+ omniauth-oauth2 (= 1.7.2)
7
7
  rexml (= 3.2.5)
8
8
 
9
9
  GEM
@@ -11,32 +11,16 @@ GEM
11
11
  specs:
12
12
  ast (2.4.2)
13
13
  diff-lcs (1.4.4)
14
- faraday (1.8.0)
15
- faraday-em_http (~> 1.0)
16
- faraday-em_synchrony (~> 1.0)
17
- faraday-excon (~> 1.1)
18
- faraday-httpclient (~> 1.0.1)
19
- faraday-net_http (~> 1.0)
20
- faraday-net_http_persistent (~> 1.1)
21
- faraday-patron (~> 1.0)
22
- faraday-rack (~> 1.0)
23
- multipart-post (>= 1.2, < 3)
14
+ faraday (2.2.0)
15
+ faraday-net_http (~> 2.0)
24
16
  ruby2_keywords (>= 0.0.4)
25
- faraday-em_http (1.0.0)
26
- faraday-em_synchrony (1.0.0)
27
- faraday-excon (1.1.0)
28
- faraday-httpclient (1.0.1)
29
- faraday-net_http (1.0.1)
30
- faraday-net_http_persistent (1.2.0)
31
- faraday-patron (1.0.0)
32
- faraday-rack (1.0.0)
33
- hashie (4.1.0)
17
+ faraday-net_http (2.0.1)
18
+ hashie (5.0.0)
34
19
  jwt (2.3.0)
35
20
  multi_json (1.15.0)
36
21
  multi_xml (0.6.0)
37
- multipart-post (2.1.1)
38
- oauth2 (1.4.7)
39
- faraday (>= 0.8, < 2.0)
22
+ oauth2 (1.4.9)
23
+ faraday (>= 0.17.3, < 3.0)
40
24
  jwt (>= 1.0, < 3.0)
41
25
  multi_json (~> 1.3)
42
26
  multi_xml (~> 0.5)
@@ -45,14 +29,14 @@ GEM
45
29
  hashie (>= 3.4.6)
46
30
  rack (>= 1.6.2, < 3)
47
31
  rack-protection
48
- omniauth-oauth2 (1.7.1)
32
+ omniauth-oauth2 (1.7.2)
49
33
  oauth2 (~> 1.4)
50
34
  omniauth (>= 1.9, < 3)
51
35
  parallel (1.21.0)
52
36
  parser (3.0.2.0)
53
37
  ast (~> 2.4.1)
54
38
  rack (2.2.3)
55
- rack-protection (2.1.0)
39
+ rack-protection (2.2.0)
56
40
  rack
57
41
  rainbow (3.0.0)
58
42
  rake (13.0.6)
data/README.md CHANGED
@@ -22,13 +22,10 @@ Or install it yourself as:
22
22
 
23
23
  ### Configuration
24
24
 
25
+ Create a new OAuth2 token in your Nextcloud instance. You can find the option in `Settings > Administration > Security` at the bottom of the page or using the link [https://nc.example.com/index.php/settings/admin/security#oauth2](https://nc.example.com/index.php/settings/admin/security#oauth2) by substituting the hostname.
26
+
25
27
  ```ruby
26
- NEXTCLOUD_URL = 'https://nc.bbz-cfp.ch'
27
- config.omniauth :nextcloud, ENV['NEXTCLOUD_APP_ID'], ENV['NEXTCLOUD_APP_SECRET'], client_options: {
28
- :site => "#{NEXTCLOUD_URL}/index.php/apps/oauth2",
29
- :authorize_url => "#{NEXTCLOUD_URL}/index.php/apps/oauth2/authorize",
30
- :token_url => "#{NEXTCLOUD_URL}/index.php/apps/oauth2/api/v1/token",
31
- }
28
+ config.omniauth :nextcloud, ENV['NEXTCLOUD_APP_ID'], ENV['NEXTCLOUD_APP_SECRET'], site_url: 'https://nc.bbz-cfp.ch'
32
29
  ```
33
30
 
34
31
  ### Rails
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module Nextcloud
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -15,14 +15,17 @@ module OmniAuth
15
15
  # initializing your consumer from the OAuth gem.
16
16
  option :client_options, {}
17
17
 
18
- def client
18
+ def merged_client_options
19
19
  overrides = options.client_options
20
- client_options = {
20
+ {
21
21
  site: overrides.site || "#{options.site_url}/index.php/apps/oauth2",
22
22
  authorize_url: overrides.authorize_url || "#{options.site_url}/index.php/apps/oauth2/authorize",
23
23
  token_url: overrides.token_url || "#{options.site_url}/index.php/apps/oauth2/api/v1/token"
24
24
  }
25
- ::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(client_options))
25
+ end
26
+
27
+ def client
28
+ ::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(merged_client_options))
26
29
  end
27
30
 
28
31
  # You may specify that your strategy should use PKCE by setting
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  # Uncomment to register a new dependency of your gem
31
31
  spec.add_dependency "omniauth", "2.0.4"
32
- spec.add_dependency "omniauth-oauth2", "1.7.1"
32
+ spec.add_dependency "omniauth-oauth2", "1.7.2"
33
33
  spec.add_dependency "rexml", "3.2.5"
34
34
 
35
35
  # For more information and examples about making a new gem, checkout our
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-nextcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas_Skywalker
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-17 00:00:00.000000000 Z
11
+ date: 2022-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.7.1
33
+ version: 1.7.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.7.1
40
+ version: 1.7.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rexml
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ metadata:
84
84
  homepage_uri: https://github.com/code-fabrik/omniauth-nextcloud
85
85
  source_code_uri: https://github.com/code-fabrik/omniauth-nextcloud
86
86
  changelog_uri: https://github.com/code-fabrik/omniauth-nextcloud
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubygems_version: 3.2.22
103
- signing_key:
103
+ signing_key:
104
104
  specification_version: 4
105
105
  summary: omniauth provider for Nextcloud
106
106
  test_files: []