omniauth-mpassid 0.5.1 → 0.6.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 +97 -63
- data/lib/omniauth/strategies/mpassid.rb +76 -107
- data/lib/omniauth-mpassid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17b65779d78646dc1de8ab9199d37fc0493020fd8a6d3b36e2b4badc859622c6
|
4
|
+
data.tar.gz: 6ba237b13f26a22109971309d64478b836e8e8e85ab2855b8f39ef7ac82bbd72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b3e8aaaa13509e29bce1586b8197fa62933982707263145e3047878a7800b218cc141874e80cc51c6b1ecf1466f7742b9d3604721a047e44d31052785222f8
|
7
|
+
data.tar.gz: 6eae3c513b774c1fa97241cbb7d4122d4054afe6716e7b8bdefc5aa8fa00d258e2a9a9c27adb9296b972cb394f84729e4d59ce5a7fd11028e47e9c52b4988859
|
data/README.md
CHANGED
@@ -109,12 +109,11 @@ The user's personal information transmitted from MPASSid can be found under
|
|
109
109
|
the `:saml_attributes` key in the OmniAuth extra hash described above.
|
110
110
|
|
111
111
|
This attributes hash will contain the keys described in this following
|
112
|
-
sub-sections.
|
113
|
-
MPASSid's own documentation but are available at least in some SAML responses.
|
112
|
+
sub-sections.
|
114
113
|
|
115
114
|
See also the MPASSid data models documentation for more information:
|
116
115
|
|
117
|
-
https://wiki.eduuni.fi/display/
|
116
|
+
https://wiki.eduuni.fi/display/OPHPALV/MPASSid%3An+tietomalli
|
118
117
|
|
119
118
|
The attributes can be either single or multi type defining whether they can
|
120
119
|
have a single or multiple values. The single type values are strings and multi
|
@@ -128,15 +127,15 @@ is `nil` for both types.
|
|
128
127
|
- SAML FriendlyName: givenName
|
129
128
|
- Type: Single (`String`)
|
130
129
|
|
131
|
-
The
|
130
|
+
The given name of the user.
|
132
131
|
|
133
|
-
#### `:
|
132
|
+
#### `:first_name`
|
134
133
|
|
135
|
-
- SAML URI:
|
136
|
-
- SAML FriendlyName:
|
134
|
+
- SAML URI: urn:mpass.id:nickname
|
135
|
+
- SAML FriendlyName: nickname
|
137
136
|
- Type: Single (`String`)
|
138
137
|
|
139
|
-
|
138
|
+
The first name / calling name / nickname of the user.
|
140
139
|
|
141
140
|
#### `:last_name`
|
142
141
|
|
@@ -146,39 +145,45 @@ All the first/given names of the user.
|
|
146
145
|
|
147
146
|
The last/family name of the user.
|
148
147
|
|
149
|
-
#### `:
|
148
|
+
#### `:provider_info`
|
150
149
|
|
151
|
-
- SAML URI: urn:mpass.id:
|
152
|
-
- SAML FriendlyName:
|
153
|
-
- Type: Multi (`Array
|
150
|
+
- SAML URI: urn:mpass.id:educationProviderInfo
|
151
|
+
- SAML FriendlyName: mpassEducationProviderInfo
|
152
|
+
- Type: Multi (`Array<String>`)
|
154
153
|
|
155
|
-
|
154
|
+
Information about the educational provider, each value contains multiple fields
|
155
|
+
separated with a semicolon (`;`) character.
|
156
156
|
|
157
|
-
|
157
|
+
For instance `1.2.246.562.10.494695390410;Virallinen nimi`.
|
158
158
|
|
159
|
-
|
159
|
+
The description of the fields:
|
160
160
|
|
161
|
-
|
161
|
+
1. The educational provider's OID as specified at the link below (`KOULUTUSTOIMIJA`)
|
162
|
+
2. The educational provider's name as specified at the link below
|
162
163
|
|
163
|
-
|
164
|
-
* urn:mpass.id:municipality
|
165
|
-
* urn:educloudalliance.org:municipality
|
166
|
-
- SAML FriendlyName: one of the following (first found attribute)
|
167
|
-
* N/A
|
168
|
-
* ecaMunicipality
|
169
|
-
- Type: Multi (`Array`)
|
164
|
+
The OIDs and information for these OIDs can be found from:
|
170
165
|
|
171
|
-
|
166
|
+
https://virkailija.opintopolku.fi/organisaatio-service/swagger-ui/index.html
|
172
167
|
|
173
|
-
#### `:
|
168
|
+
#### `:school_info`
|
174
169
|
|
175
|
-
- SAML URI: urn:mpass.id:
|
176
|
-
- SAML FriendlyName:
|
177
|
-
- Type: Multi (`Array
|
170
|
+
- SAML URI: urn:mpass.id:schoolInfo
|
171
|
+
- SAML FriendlyName: mpassSchoolInfo
|
172
|
+
- Type: Multi (`Array<String>`)
|
173
|
+
|
174
|
+
Information about the school, each value contains multiple fields separated with
|
175
|
+
a semicolon (`;`) character.
|
176
|
+
|
177
|
+
The values are provided in both of the following formats as separate values:
|
178
|
+
|
179
|
+
- `30076;Mansikkalan testi peruskoulu`
|
180
|
+
- `1.2.246.562.99.00000000002;Mansikkalan testi peruskoulu`
|
178
181
|
|
179
|
-
|
182
|
+
##### First format
|
180
183
|
|
181
|
-
|
184
|
+
The first value format specifies the national educational institution code as
|
185
|
+
the first column separated with a semicolon (`;`) as specified at the national
|
186
|
+
educational institution registry.
|
182
187
|
|
183
188
|
For the list of codes, see:
|
184
189
|
|
@@ -189,37 +194,57 @@ An example for a single school code (04647), JSON format:
|
|
189
194
|
|
190
195
|
https://virkailija.opintopolku.fi/koodisto-service/rest/codeelement/oppilaitosnumero_04647
|
191
196
|
|
192
|
-
|
197
|
+
##### Second format
|
193
198
|
|
194
|
-
|
195
|
-
|
196
|
-
|
199
|
+
The second value format specifies the OID of the educational institution as
|
200
|
+
the first column separated with a semicolon (`;`). These values are specified
|
201
|
+
at (filter with `OPPILAITOS`):
|
197
202
|
|
198
|
-
|
203
|
+
https://virkailija.opintopolku.fi/organisaatio-service/swagger-ui/index.html
|
199
204
|
|
200
|
-
#### `:
|
205
|
+
#### `:class_level`
|
201
206
|
|
202
|
-
- SAML URI:
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
* ecaGroup
|
208
|
-
- Type: Multi (`Array`)
|
207
|
+
- SAML URI: urn:mpass.id:classLevel
|
208
|
+
- SAML FriendlyName: N/A
|
209
|
+
- Type: Single (`String`)
|
210
|
+
|
211
|
+
The class level information (0-10) of the authenticated user.
|
209
212
|
|
210
|
-
|
213
|
+
For instance 8 or 3.
|
211
214
|
|
212
|
-
For
|
215
|
+
For further information, see:
|
213
216
|
|
214
|
-
|
217
|
+
https://www.stat.fi/meta/kas/vuosiluokka.html
|
218
|
+
|
219
|
+
This information is available for pre-primary education and comprehensive
|
220
|
+
education students.
|
221
|
+
|
222
|
+
This information is not available for secondary level students (upper secondary
|
223
|
+
education or vocational education).
|
224
|
+
|
225
|
+
#### `:learning_materials_charge`
|
215
226
|
|
216
227
|
- SAML URI: urn:mpass.id:classLevel
|
217
228
|
- SAML FriendlyName: N/A
|
218
|
-
- Type: Multi (`Array
|
229
|
+
- Type: Multi (`Array<String>`)
|
219
230
|
|
220
|
-
|
231
|
+
Specifies for secondary level education pupils whether their learning materials
|
232
|
+
are paid or not, each value contains multiple fields separated with a semicolon
|
233
|
+
(`;`) character.
|
221
234
|
|
222
|
-
|
235
|
+
The values are provided in both of the following formats as separate values:
|
236
|
+
|
237
|
+
- `0;00000`
|
238
|
+
- `0;1.2.246.562.99.00000000003`
|
239
|
+
|
240
|
+
Similarly to the `:school_info` field, the values are provided with the national
|
241
|
+
educational institution code as well as the educational institution's OID.
|
242
|
+
|
243
|
+
The first column specifies the value for the field which is explained as
|
244
|
+
follows:
|
245
|
+
|
246
|
+
- `0` = Learning material is free for the pupil
|
247
|
+
- `1` = Learning material is paid for the pupil
|
223
248
|
|
224
249
|
#### `:role`
|
225
250
|
|
@@ -229,33 +254,34 @@ For instance 8 or 3.
|
|
229
254
|
- SAML FriendlyName: one of the following (first found attribute)
|
230
255
|
* N/A
|
231
256
|
* ecaStructuredRole
|
232
|
-
- Type: Multi (`Array
|
257
|
+
- Type: Multi (`Array<String>`)
|
233
258
|
|
234
259
|
The roles of the user in four parts, divided with a semicolon (;) character.
|
235
260
|
First municipality, followed by school code, group and role in the group.
|
236
261
|
|
237
|
-
For instance
|
262
|
+
For instance `1.2.246.562.99.00000000001;00000;1A;Oppilas;1;1.2.246.562.99.00000000003;`.
|
238
263
|
|
239
|
-
|
264
|
+
Each value consists of the following fields:
|
240
265
|
|
241
|
-
|
242
|
-
|
243
|
-
|
266
|
+
1. Educational provider OID (e.g. `1.2.246.562.99.00000000001`)
|
267
|
+
2. National educational institution code (e.g. `00000`)
|
268
|
+
3. Class or group information of the pupil (e.g. `1A`)
|
269
|
+
4. Role of the user (e.g. `Oppilas`)
|
270
|
+
5. Role code of the user (e.g. `1`)
|
271
|
+
6. Educational institution OID (e.g. `1.2.246.562.99.00000000003`)
|
272
|
+
7. The office / branch OID (similar format as other OIDs, can be also empty)
|
244
273
|
|
245
|
-
|
274
|
+
The OIDs for the educational provider (`KOULUTUSTOIMIJA`), educational
|
275
|
+
institution (`OPPILAITOS`) and office / branch (`TOIMIPISTE`) can be found from:
|
246
276
|
|
247
|
-
|
277
|
+
https://virkailija.opintopolku.fi/organisaatio-service/swagger-ui/index.html
|
248
278
|
|
249
|
-
|
250
|
-
|
251
|
-
#### `:funet_person_learner_id` (undocumented)
|
279
|
+
#### `:learner_id`
|
252
280
|
|
253
281
|
- SAML URI: urn:oid:1.3.6.1.4.1.16161.1.1.27
|
254
|
-
- SAML FriendlyName:
|
282
|
+
- SAML FriendlyName: learnerId
|
255
283
|
- Type: Single (`String`)
|
256
284
|
|
257
|
-
NOTE: This attribute is undocumented by MPASSid.
|
258
|
-
|
259
285
|
11-digit identifier, which may be used to identify a person while storing,
|
260
286
|
managing or transferring personal data.
|
261
287
|
|
@@ -263,6 +289,14 @@ See:
|
|
263
289
|
|
264
290
|
https://wiki.eduuni.fi/display/CSCHAKA/funetEduPersonSchema2dot2#funetEduPersonSchema2dot2-funetEduPersonLearnerId
|
265
291
|
|
292
|
+
#### `:original_issuer`
|
293
|
+
|
294
|
+
Information about the user's home organization that is relying the information
|
295
|
+
to MPASSid. This information is added by the Finnish National Agency for
|
296
|
+
Education.
|
297
|
+
|
298
|
+
For instance `1.2.246.562.99.00000000001`.
|
299
|
+
|
266
300
|
## License
|
267
301
|
|
268
302
|
MIT, see [LICENSE](LICENSE).
|
@@ -39,44 +39,41 @@ module OmniAuth
|
|
39
39
|
|
40
40
|
# The request attributes for MPASSid
|
41
41
|
option :request_attributes, [
|
42
|
-
# The
|
43
|
-
# identifier for identifying the user. NOTE: will change if the user
|
44
|
-
# moves to another user registry.
|
45
|
-
# (single value)
|
46
|
-
{
|
47
|
-
name: 'urn:mpass.id:uid',
|
48
|
-
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
49
|
-
friendly_name: 'mpassUsername'
|
50
|
-
},
|
51
|
-
# Funet EDU person learner ID
|
42
|
+
# The last/family name of the user.
|
52
43
|
# (single value)
|
53
44
|
{
|
54
|
-
name: 'urn:oid:
|
45
|
+
name: 'urn:oid:2.5.4.4',
|
55
46
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
56
|
-
friendly_name: '
|
47
|
+
friendly_name: 'sn'
|
57
48
|
},
|
58
|
-
# The
|
49
|
+
# The given name of the user.
|
59
50
|
# (single value)
|
60
51
|
{
|
61
52
|
name: 'urn:oid:2.5.4.42',
|
62
53
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
63
54
|
friendly_name: 'givenName'
|
64
55
|
},
|
65
|
-
#
|
56
|
+
# The first name/nickname of the user (calling name / kutsumanimi).
|
66
57
|
# (single value)
|
67
58
|
{
|
68
|
-
name: '
|
59
|
+
name: 'urn:mpass.id:nickname',
|
69
60
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
70
|
-
friendly_name: '
|
61
|
+
friendly_name: 'nickname'
|
71
62
|
},
|
72
|
-
# The
|
63
|
+
# The unique identifier of the authenticated user. Currently recommended
|
64
|
+
# identifier for identifying the user. NOTE: will change if the user
|
65
|
+
# moves to another user registry.
|
73
66
|
# (single value)
|
74
67
|
{
|
75
|
-
name: 'urn:
|
68
|
+
name: 'urn:mpass.id:uid',
|
76
69
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
77
|
-
friendly_name: '
|
70
|
+
friendly_name: 'mpassUsername'
|
78
71
|
},
|
79
|
-
#
|
72
|
+
# Combination of the school code and official name of the educational
|
73
|
+
# institution separated with semicolon.
|
74
|
+
# For instance: 30076;Mansikkalan testi peruskoulu AND 1.2.246.562.99.00000000002;Mansikkalan testi peruskoulu
|
75
|
+
#
|
76
|
+
# Contains the school code of the authenticated user. See
|
80
77
|
# https://virkailija.opintopolku.fi/koodisto-service/rest/json/oppilaitosnumero/koodi
|
81
78
|
# (JSON format)
|
82
79
|
# https://virkailija.opintopolku.fi/koodisto-service/rest/oppilaitosnumero/koodi
|
@@ -85,93 +82,77 @@ module OmniAuth
|
|
85
82
|
# https://virkailija.opintopolku.fi/koodisto-service/rest/codeelement/oppilaitosnumero_04647
|
86
83
|
# for school code 04647.
|
87
84
|
# (multi value)
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
friendly_name: 'mpassSchoolCode'
|
92
|
-
},
|
93
|
-
# The human-readable name of the school of the authenticated user.
|
94
|
-
# (multi value)
|
95
|
-
{
|
96
|
-
name: 'urn:mpass.id:school',
|
97
|
-
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
98
|
-
friendly_name: 'school'
|
99
|
-
},
|
100
|
-
# Combination of the school code and official name of the educational
|
101
|
-
# institution separated with semicolon.
|
102
|
-
# For instance: 00000;Tuntematon
|
85
|
+
#
|
86
|
+
# The OIDs for educational institution (`OPPILAITOS`) can be found from:
|
87
|
+
# https://virkailija.opintopolku.fi/organisaatio-service/swagger-ui/index.html
|
103
88
|
{
|
104
89
|
name: 'urn:mpass.id:schoolInfo',
|
105
90
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
106
91
|
friendly_name: 'mpassSchoolInfo'
|
107
92
|
},
|
108
|
-
# The class/group-information of the authenticated user.
|
109
|
-
# For instance: 8A or 3B.
|
110
|
-
# (multi value)
|
111
|
-
{
|
112
|
-
name: 'urn:mpass.id:class',
|
113
|
-
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
114
|
-
friendly_name: 'mpassClass'
|
115
|
-
},
|
116
|
-
{
|
117
|
-
name: 'urn:educloudalliance.org:group',
|
118
|
-
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
119
|
-
friendly_name: 'ecaGroup'
|
120
|
-
},
|
121
93
|
# The class/level-information of the authenticated user.
|
122
94
|
# For instance 8 or 3.
|
123
|
-
# (
|
95
|
+
# (single value)
|
124
96
|
{
|
125
97
|
name: 'urn:mpass.id:classLevel',
|
126
98
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
127
99
|
friendly_name: 'mpassClassLevel'
|
128
100
|
},
|
129
|
-
# The
|
130
|
-
# For instance
|
101
|
+
# The learning material charge.
|
102
|
+
# For instance 0;00000 AND 0;1.2.246.562.99.00000000003.
|
131
103
|
# (multi value)
|
132
104
|
{
|
133
|
-
name: 'urn:
|
105
|
+
name: 'urn:mpass.id:learningMaterialsCharge',
|
134
106
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
135
|
-
friendly_name: '
|
107
|
+
friendly_name: 'mpassLearningMaterialsCharge'
|
136
108
|
},
|
137
109
|
# The role of the user in four parts, divided with a semicolon (;)
|
138
110
|
# character. First educational provider's organization OID, followed by
|
139
|
-
# school code, group
|
140
|
-
#
|
111
|
+
# school code, group (e.g. the class), role in the group (e.g.
|
112
|
+
# "Oppilas"), the role code (e.g. "1"), the educational institution's
|
113
|
+
# OID and finally the office OID (can be undefined).
|
114
|
+
# For instance 1.2.246.562.99.00000000001;00000;1A;Oppilas;1;1.2.246.562.99.00000000003;
|
141
115
|
# (multi value)
|
142
116
|
#
|
143
|
-
# The educational providers
|
144
|
-
#
|
117
|
+
# The OIDs for educational providers (`KOULUTUSTOIMIJA`), educational
|
118
|
+
# institutions (`OPPILAITOS`) and offices/branches (`TOIMIPISTE`) can be
|
119
|
+
# found from:
|
120
|
+
# https://virkailija.opintopolku.fi/organisaatio-service/swagger-ui/index.html
|
121
|
+
#
|
122
|
+
# The test entries are in:
|
123
|
+
# https://github.com/Opetushallitus/aitu/blob/master/ttk-db/resources/db/migration/V12_0__oppilaitosten_puuttuvat_koulutustoimijat.sql
|
145
124
|
{
|
146
125
|
name: 'urn:mpass.id:role',
|
147
126
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
148
127
|
friendly_name: 'mpassRole'
|
149
128
|
},
|
150
|
-
#
|
151
|
-
# (
|
152
|
-
#
|
153
|
-
# The educational providers' organization OIDs can be found from:
|
154
|
-
# https://github.com/Opetushallitus/aitu/blob/master/ttk-db/resources/db/migration/V11_2__koulutustoimijat.sql
|
155
|
-
{
|
156
|
-
name: 'urn:mpass.id:educationProviderId',
|
157
|
-
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
158
|
-
friendly_name: 'mpassEducationProviderOid'
|
159
|
-
},
|
160
|
-
# The educational provider's human-readable name.
|
161
|
-
# (multi value)
|
129
|
+
# Funet EDU person learner ID
|
130
|
+
# (single value)
|
162
131
|
{
|
163
|
-
name: 'urn:
|
132
|
+
name: 'urn:oid:1.3.6.1.4.1.16161.1.1.27',
|
164
133
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
165
|
-
friendly_name: '
|
134
|
+
friendly_name: 'learnerId'
|
166
135
|
},
|
167
136
|
# Combination of the education provider's organisation-OID and official
|
168
137
|
# name. Separated by semicolon.
|
169
138
|
# For instance: 1.2.246.562.10.494695390410;Virallinen nimi
|
170
139
|
# (multi value)
|
140
|
+
#
|
141
|
+
# The OIDs for educational providers (`KOULUTUSTOIMIJA`) can be found
|
142
|
+
# from:
|
143
|
+
# https://virkailija.opintopolku.fi/organisaatio-service/swagger-ui/index.html
|
171
144
|
{
|
172
145
|
name: 'urn:mpass.id:educationProviderInfo',
|
173
146
|
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
174
147
|
friendly_name: 'mpassEducationProviderInfo'
|
148
|
+
},
|
149
|
+
# The relaying organization for the information.
|
150
|
+
# For instance: 1.2.246.562.10.00000000000
|
151
|
+
# (single value)
|
152
|
+
{
|
153
|
+
name: 'urn:mpass.id:originalIssuer',
|
154
|
+
name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
|
155
|
+
friendly_name: 'originalIssuer'
|
175
156
|
}
|
176
157
|
]
|
177
158
|
|
@@ -179,31 +160,35 @@ module OmniAuth
|
|
179
160
|
# https://github.com/omniauth/omniauth/wiki/Auth-Hash-Schema#schema-10-and-later
|
180
161
|
option(
|
181
162
|
:attribute_statements,
|
182
|
-
#
|
183
|
-
first_name: ['urn:oid:2.5.4.42'
|
184
|
-
last_name: ['urn:oid:2.5.4.4']
|
185
|
-
# The education provider (e.g. municipality) of the person (literal format in Finnish)
|
186
|
-
location: ['urn:mpass.id:educationProvider']
|
163
|
+
# First name/calling name or given name (in case first name/calling name is not found)
|
164
|
+
first_name: ['urn:mpass.id:nickname', 'urn:oid:2.5.4.42'],
|
165
|
+
last_name: ['urn:oid:2.5.4.4']
|
187
166
|
)
|
188
167
|
|
189
168
|
info do
|
190
169
|
# Generate the full name to the info hash
|
191
170
|
first_name = find_attribute_by(
|
192
171
|
[
|
193
|
-
'urn:
|
194
|
-
'
|
172
|
+
'urn:mpass.id:nickname',
|
173
|
+
'urn:oid:2.5.4.42'
|
195
174
|
]
|
196
175
|
)
|
197
176
|
last_name = find_attribute_by(['urn:oid:2.5.4.4'])
|
198
177
|
display_name = "#{first_name} #{last_name}".strip
|
199
|
-
display_name = nil if display_name.length.zero?
|
178
|
+
display_name = nil if display_name.length.zero? # rubocop:disable Style/ZeroLengthPredicate
|
200
179
|
|
201
180
|
found_attributes = [[:name, display_name]]
|
202
181
|
|
182
|
+
provider = find_attribute_by(['urn:mpass.id:educationProviderInfo'])
|
183
|
+
if provider
|
184
|
+
provider_parts = provider.split(';')
|
185
|
+
found_attributes << [:location, provider_parts[1]] if provider_parts[1]
|
186
|
+
end
|
187
|
+
|
203
188
|
# Default functionality from omniauth-saml
|
204
189
|
found_attributes += options.attribute_statements.map do |key, values|
|
205
190
|
attribute = find_attribute_by(values)
|
206
|
-
[key, attribute]
|
191
|
+
[key.to_sym, attribute]
|
207
192
|
end
|
208
193
|
|
209
194
|
found_attributes.to_h
|
@@ -222,43 +207,27 @@ module OmniAuth
|
|
222
207
|
option(
|
223
208
|
:saml_attributes_map,
|
224
209
|
given_name: ['urn:oid:2.5.4.42'],
|
225
|
-
|
210
|
+
first_name: ['urn:mpass.id:nickname'],
|
226
211
|
last_name: ['urn:oid:2.5.4.4'],
|
227
|
-
|
228
|
-
name: ['urn:mpass.id:
|
229
|
-
type: :multi
|
230
|
-
},
|
231
|
-
provider_name: {
|
232
|
-
name: ['urn:mpass.id:educationProvider'],
|
233
|
-
type: :multi
|
234
|
-
},
|
235
|
-
school_code: {
|
236
|
-
name: ['urn:mpass.id:schoolCode'],
|
212
|
+
provider_info: {
|
213
|
+
name: ['urn:mpass.id:educationProviderInfo'],
|
237
214
|
type: :multi
|
238
215
|
},
|
239
|
-
|
240
|
-
name: ['urn:mpass.id:
|
216
|
+
school_info: {
|
217
|
+
name: ['urn:mpass.id:schoolInfo'],
|
241
218
|
type: :multi
|
242
219
|
},
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
},
|
247
|
-
class_level: {
|
248
|
-
name: ['urn:mpass.id:classLevel'],
|
220
|
+
class_level: ['urn:mpass.id:classLevel'],
|
221
|
+
learning_materials_charge: {
|
222
|
+
name: ['urn:mpass.id:learningMaterialsCharge'],
|
249
223
|
type: :multi
|
250
224
|
},
|
251
225
|
role: {
|
252
|
-
name: ['urn:mpass.id:role'
|
253
|
-
type: :multi
|
254
|
-
},
|
255
|
-
role_name: {
|
256
|
-
name: ['urn:educloudalliance.org:role'],
|
226
|
+
name: ['urn:mpass.id:role'],
|
257
227
|
type: :multi
|
258
228
|
},
|
259
|
-
|
260
|
-
|
261
|
-
funet_person_learner_id: ['urn:oid:1.3.6.1.4.1.16161.1.1.27']
|
229
|
+
learner_id: ['urn:oid:1.3.6.1.4.1.16161.1.1.27'],
|
230
|
+
original_issuer: ['urn:mpass.id:originalIssuer']
|
262
231
|
)
|
263
232
|
|
264
233
|
# Defines the SAML attribute from which to determine the OmniAuth `uid`.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-mpassid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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:
|
11
|
+
date: 2024-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-saml
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
|
-
rubygems_version: 3.
|
153
|
+
rubygems_version: 3.2.33
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Provides an MPASSid strategy for OmniAuth.
|