decidim-mpassid 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/app/controllers/decidim/mpassid/omniauth_callbacks_controller.rb +2 -4
- data/lib/decidim/mpassid.rb +3 -1
- data/lib/decidim/mpassid/test/runtime.rb +3 -9
- data/lib/decidim/mpassid/version.rb +2 -2
- data/lib/generators/templates/mpassid_initializer_test.rb +2 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e601b5e1c7a219f0055b853bd270849ce8eda93740fe6a052a6ff00c016c8a61
|
4
|
+
data.tar.gz: ddd427c2f7ece9b43f028c2ec7695c99e7ca05cfa24f1e8141d742bf0618c2ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 347e794ebf0378218556d96cf6f7b0ad1694c761c3aea0f9d124b8d8e82d3bf821a6df730302a3053cb7bf6ebcd2aac1e8a68b0922517d6022b98376c354c2c8
|
7
|
+
data.tar.gz: a0a83825bd9489c98f20b9c50a9a245ef4a0401e11412f18c203c001b79e058fd693cc39ff7a8739cfa9f6c9c754c5698cdbd02a69e2df5b023901bc926f5689
|
data/README.md
CHANGED
@@ -49,6 +49,9 @@ You need to set the following configuration options inside the initializer:
|
|
49
49
|
entity ID used to identify the service at the MPASSid SAML identity provider.
|
50
50
|
* Default: depends on the application's URL, e.g.
|
51
51
|
`https://www.example.org/users/auth/mpassid/metadata`
|
52
|
+
|
53
|
+
Optionally you can also configure the module with the following options:
|
54
|
+
|
52
55
|
- `:auto_email_domain` - Defines the auto-email domain for automatically
|
53
56
|
verified email addresses for the identified users. This makes it easier for
|
54
57
|
the users to use the system as they don't have to go through any extra steps
|
@@ -57,6 +60,8 @@ You need to set the following configuration options inside the initializer:
|
|
57
60
|
`mpassid-756be91097ac490961fd04f121cb9550@example.org`. The email will
|
58
61
|
always have the `mpassid-` prefix and the domain part is defined by the
|
59
62
|
configuration option.
|
63
|
+
* In case this is not defined, the organization's host will be used as the
|
64
|
+
default.
|
60
65
|
|
61
66
|
For more information about these options and possible other options, please
|
62
67
|
refer to the [`omniauth-mpassid`](https://github.com/mainio/omniauth-mpassid)
|
@@ -232,10 +232,8 @@ module Decidim
|
|
232
232
|
|
233
233
|
def verified_email
|
234
234
|
@verified_email ||= begin
|
235
|
-
|
236
|
-
|
237
|
-
"mpassid-#{person_identifier_digest}@#{domain}"
|
238
|
-
end
|
235
|
+
domain = Decidim::Mpassid.auto_email_domain || current_organization.host
|
236
|
+
"mpassid-#{person_identifier_digest}@#{domain}"
|
239
237
|
end
|
240
238
|
end
|
241
239
|
|
data/lib/decidim/mpassid.rb
CHANGED
@@ -20,7 +20,9 @@ module Decidim
|
|
20
20
|
|
21
21
|
# Defines the auto email domain to generate verified email addresses upon
|
22
22
|
# the user's registration automatically that have format similar to
|
23
|
-
# "mpassid-identifier@auto-email-domain.fi"
|
23
|
+
# "mpassid-identifier@auto-email-domain.fi".
|
24
|
+
#
|
25
|
+
# In case this is not defined, the default is the organization's domain.
|
24
26
|
config_accessor :auto_email_domain
|
25
27
|
|
26
28
|
config_accessor :sp_entity_id, instance_reader: false
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "webmock"
|
4
|
+
|
3
5
|
module Decidim
|
4
6
|
module Mpassid
|
5
7
|
module Test
|
@@ -32,15 +34,7 @@ module Decidim
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def instance_initialize
|
35
|
-
yield self
|
36
|
-
|
37
|
-
# Setup the MPASSid OmniAuth strategy for Devise
|
38
|
-
# ::Devise.setup do |config|
|
39
|
-
# config.omniauth(
|
40
|
-
# :mpassid,
|
41
|
-
# Decidim::Mpassid.omniauth_settings
|
42
|
-
# )
|
43
|
-
# end
|
37
|
+
yield self if block_given?
|
44
38
|
end
|
45
39
|
end
|
46
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-mpassid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antti Hukkanen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.19.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: 0.
|
26
|
+
version: 0.19.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: omniauth-mpassid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.19.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.19.0
|
55
55
|
description: Adds MPASSid authentication provider to Decidim.
|
56
56
|
email:
|
57
57
|
- antti.hukkanen@mainiotech.fi
|