omniauth-munic 1.1 → 1.2.0
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 +5 -5
- data/CHANGELOG.md +6 -0
- data/Rakefile +3 -1
- data/bin/console +3 -1
- data/lib/omniauth-munic/version.rb +5 -3
- data/lib/omniauth/strategies/munic.rb +37 -30
- data/omniauth-munic.gemspec +19 -19
- metadata +16 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 949b67fc09f5a588fd91a5eea460c27954d72d10ddec4ad99f5e3d3a6231b189
|
4
|
+
data.tar.gz: 37ce14a6b38964427d3050b5408f566632fe4ce8e10feae3bba45b583e9be170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 335d598ae88ba5ae26b7609860e4ae1f933b9b8f2ab3c0f3cc9baf0b79a744df6cde19b6d6958c5a5f31e162b06867d0386c2bd90f37d023dd5bd9feb17d5d54
|
7
|
+
data.tar.gz: 6e07a162acf18f7cc034306bbeeca58aa9965e7e690239c325c21541b041977d2aa816b7171794a66342ae2c60dabc4402a071d0967e39d07d743f704b30a85f
|
data/CHANGELOG.md
ADDED
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,38 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module OmniAuth
|
2
|
-
|
3
|
-
|
4
|
+
module Strategies
|
5
|
+
autoload :Munic, 'omniauth/strategies/munic'
|
6
|
+
|
7
|
+
# MunicIO strategy
|
8
|
+
class Munic < OmniAuth::Strategies::OAuth2
|
9
|
+
# Give your strategy a name.
|
10
|
+
option :name, 'munic'
|
4
11
|
|
5
|
-
|
6
|
-
|
7
|
-
|
12
|
+
# This is where you pass the options you would pass when
|
13
|
+
# initializing your consumer from the OAuth gem.
|
14
|
+
option :client_options, site: 'https://connect.munic.io'
|
8
15
|
|
9
|
-
|
10
|
-
|
11
|
-
|
16
|
+
# These are called after authentication has succeeded. If
|
17
|
+
# possible, you should try to set the UID without making
|
18
|
+
# additional calls (if the user id is returned with the token
|
19
|
+
# or as a URI parameter). This may not be possible with all
|
20
|
+
# providers.
|
21
|
+
uid { raw_info['uid'] }
|
12
22
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
23
|
+
info do
|
24
|
+
i = {
|
25
|
+
email: raw_info['email'],
|
26
|
+
full_name: raw_info['full_name'],
|
27
|
+
language: raw_info['language'],
|
28
|
+
organization_id: raw_info['organization_id'],
|
29
|
+
organization_name: raw_info['organization_name']
|
30
|
+
}
|
31
|
+
i[:time_zone] = raw_info['time_zone'] unless raw_info['time_zone'].nil?
|
32
|
+
i[:company_name] = raw_info['company_name'] unless raw_info['company_name'].nil?
|
33
|
+
i
|
34
|
+
end
|
19
35
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
full_name: raw_info['full_name'],
|
24
|
-
language: raw_info['language'],
|
25
|
-
organization_id: raw_info['organization_id'],
|
26
|
-
organization_name: raw_info['organization_name']
|
27
|
-
}
|
28
|
-
i[:time_zone] = raw_info['time_zone'] unless raw_info['time_zone'].nil?
|
29
|
-
i[:company_name] = raw_info['company_name'] unless raw_info['company_name'].nil?
|
30
|
-
i
|
31
|
-
end
|
36
|
+
def raw_info
|
37
|
+
@raw_info ||= access_token.get('/api/v1/users/me.json').parsed
|
38
|
+
end
|
32
39
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
40
|
+
def callback_url
|
41
|
+
full_host + script_name + callback_path
|
42
|
+
end
|
37
43
|
end
|
44
|
+
end
|
38
45
|
end
|
data/omniauth-munic.gemspec
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'omniauth-munic/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
|
8
|
+
spec.name = 'omniauth-munic'
|
9
|
+
spec.version = OmniAuth::Munic::VERSION
|
10
|
+
|
11
|
+
spec.description = 'Munic.io OAuth2 strategy for OmniAuth.'
|
12
|
+
spec.summary = spec.description
|
8
13
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
spec.authors = ['maxime dufay']
|
15
|
+
spec.email = ['maxime.dufay@mobile-devices.fr']
|
16
|
+
spec.homepage = 'https://github.com/municio/omniauth-munic'
|
17
|
+
spec.license = 'MIT'
|
13
18
|
|
14
|
-
|
15
|
-
spec.summary = spec.description
|
16
|
-
spec.homepage = 'https://github.com/municio/omniauth-munic'
|
17
|
-
spec.license = 'MIT'
|
19
|
+
spec.add_dependency 'omniauth-oauth2', '~> 1.6.0'
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
-
spec.require_paths = ['lib']
|
21
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
22
|
+
spec.add_development_dependency 'rspec', '~> 3.8', '>= 3.8.0'
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
spec.bindir = 'exe'
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ['lib']
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-munic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- maxime dufay
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -16,77 +16,49 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.9'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.9'
|
26
|
+
version: 1.6.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
44
30
|
requirements:
|
45
|
-
- - "
|
31
|
+
- - ">="
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
33
|
+
version: 12.3.3
|
48
34
|
type: :development
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- - "
|
38
|
+
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
40
|
+
version: 12.3.3
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
47
|
+
version: '3.8'
|
62
48
|
- - ">="
|
63
49
|
- !ruby/object:Gem::Version
|
64
|
-
version: 3.
|
50
|
+
version: 3.8.0
|
65
51
|
type: :development
|
66
52
|
prerelease: false
|
67
53
|
version_requirements: !ruby/object:Gem::Requirement
|
68
54
|
requirements:
|
69
55
|
- - "~>"
|
70
56
|
- !ruby/object:Gem::Version
|
71
|
-
version: '3.
|
57
|
+
version: '3.8'
|
72
58
|
- - ">="
|
73
59
|
- !ruby/object:Gem::Version
|
74
|
-
version: 3.
|
75
|
-
|
76
|
-
name: omniauth-oauth2
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: 1.3.1
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: 1.3.1
|
89
|
-
description: The Munic OAuth2 strategy for OmniAuth 1.x.
|
60
|
+
version: 3.8.0
|
61
|
+
description: Munic.io OAuth2 strategy for OmniAuth.
|
90
62
|
email:
|
91
63
|
- maxime.dufay@mobile-devices.fr
|
92
64
|
executables: []
|
@@ -94,6 +66,7 @@ extensions: []
|
|
94
66
|
extra_rdoc_files: []
|
95
67
|
files:
|
96
68
|
- ".gitignore"
|
69
|
+
- CHANGELOG.md
|
97
70
|
- Gemfile
|
98
71
|
- README.md
|
99
72
|
- Rakefile
|
@@ -122,9 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
95
|
- !ruby/object:Gem::Version
|
123
96
|
version: '0'
|
124
97
|
requirements: []
|
125
|
-
|
126
|
-
rubygems_version: 2.5.1
|
98
|
+
rubygems_version: 3.1.2
|
127
99
|
signing_key:
|
128
100
|
specification_version: 4
|
129
|
-
summary:
|
101
|
+
summary: Munic.io OAuth2 strategy for OmniAuth.
|
130
102
|
test_files: []
|