omniauth-mpassid 0.3.1 → 0.4.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: 84ae83ac1a0c7a5fc828cbc3737b088c2b1d7541d3f1186bb6912097ef4411cc
4
- data.tar.gz: 59ceca293fcacaf4e77e8b255b36b76f7de1494dbe480f7a0139ba8b6a33a03e
3
+ metadata.gz: 568537fcfc8b851bce49732d5f2ce6dac99cf0b3e8bcd55998f3e852dc7e0039
4
+ data.tar.gz: 53e4061a25662610162a00fad3589422457477b6404620d60b02f28340de1f7b
5
5
  SHA512:
6
- metadata.gz: 435b88073b7560bef4704c05b066ed9ec8b00ec83f2de1a4dc4b7b639e5016e51f91a770bce4db226d8d8d06727f78dab93fd2084e2d360ce04283fd935b0097
7
- data.tar.gz: d6918ebe30bc88d39b0b32ffd69d188c33d8bef8f59a094bdf7b88e66f603c0ffc9bb91b1ca9dd8bd2da7977fe9f6a6e58e80fd39a03df018b708c32b61c11f6
6
+ metadata.gz: 32d0f6a89ef0c21992bd1c2da5ea6e2dff25cb756dfad491c18892c8770e5fc279ac53ce12b94623f0e28addc218abe6b98ff2a32209cacfc14d19b48636aa22
7
+ data.tar.gz: 5a45f519cdf497d900a9df55dda573e4221c33be1df2e2f624240d10952cde76bf4bfb137c32142a0d35c24ae18d727cec0f738b9f32b86bfe8dec9a293aacff
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OmniAuth MPASSid (SAML 2.0)
2
2
 
3
- [![Build Status](https://travis-ci.com/mainio/omniauth-mpassid.svg?branch=master)](https://travis-ci.com/mainio/omniauth-mpassid)
3
+ [![Build Status](https://github.com/mainio/omniauth-mpassid/actions/workflows/ci_omniauth_mpassid.yml/badge.svg)](https://github.com/mainio/omniauth-mpassid/actions)
4
4
  [![codecov](https://codecov.io/gh/mainio/omniauth-mpassid/branch/master/graph/badge.svg)](https://codecov.io/gh/mainio/omniauth-mpassid)
5
5
 
6
6
  This is an unofficial OmniAuth strategy for authenticating with the MPASSid
@@ -39,15 +39,13 @@ module OmniAuth
39
39
  # (single value)
40
40
  {
41
41
  name: 'urn:mpass.id:uid',
42
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
43
- friendly_name: 'mpassUsername'
42
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
44
43
  },
45
44
  # Funet EDU person learner ID
46
45
  # (single value)
47
46
  {
48
47
  name: 'urn:oid:1.3.6.1.4.1.16161.1.1.27',
49
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
50
- friendly_name: 'learnerId'
48
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
51
49
  },
52
50
  # The first/given name of the user.
53
51
  # (single value)
@@ -70,6 +68,26 @@ module OmniAuth
70
68
  name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
71
69
  friendly_name: 'sn'
72
70
  },
71
+ # The municipality code of the authenticated user. See
72
+ # http://tilastokeskus.fi/meta/luokitukset/kunta/001-2017/index.html
73
+ # for mappings in Finland.
74
+ # (multi value)
75
+ {
76
+ name: 'urn:mpass.id:municipalityCode',
77
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
78
+ friendly_name: 'municipalityCode'
79
+ },
80
+ # The human-readable name of the municipality of the authenticated user.
81
+ # (multi value)
82
+ {
83
+ name: 'urn:mpass.id:municipality',
84
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
85
+ },
86
+ {
87
+ name: 'urn:educloudalliance.org:municipality',
88
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
89
+ friendly_name: 'ecaMunicipality'
90
+ },
73
91
  # The school code of the authenticated user. See
74
92
  # https://virkailija.opintopolku.fi/koodisto-service/rest/json/oppilaitosnumero/koodi
75
93
  # (JSON format)
@@ -81,8 +99,7 @@ module OmniAuth
81
99
  # (multi value)
82
100
  {
83
101
  name: 'urn:mpass.id:schoolCode',
84
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
85
- friendly_name: 'mpassSchoolCode'
102
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
86
103
  },
87
104
  # The human-readable name of the school of the authenticated user.
88
105
  # (multi value)
@@ -91,21 +108,12 @@ module OmniAuth
91
108
  name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
92
109
  friendly_name: 'school'
93
110
  },
94
- # Combination of the school code and official name of the educational
95
- # institution separated with semicolon.
96
- # For instance: 00000;Tuntematon
97
- {
98
- name: 'urn:mpass.id:schoolInfo',
99
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
100
- friendly_name: 'mpassSchoolInfo'
101
- },
102
111
  # The class/group-information of the authenticated user.
103
112
  # For instance: 8A or 3B.
104
113
  # (multi value)
105
114
  {
106
115
  name: 'urn:mpass.id:class',
107
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
108
- friendly_name: 'mpassClass'
116
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
109
117
  },
110
118
  {
111
119
  name: 'urn:educloudalliance.org:group',
@@ -117,8 +125,7 @@ module OmniAuth
117
125
  # (multi value)
118
126
  {
119
127
  name: 'urn:mpass.id:classLevel',
120
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
121
- friendly_name: 'mpassClassLevel'
128
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
122
129
  },
123
130
  # The role name of the user.
124
131
  # For instance Oppilas.
@@ -129,43 +136,18 @@ module OmniAuth
129
136
  friendly_name: 'ecaRole'
130
137
  },
131
138
  # The role of the user in four parts, divided with a semicolon (;)
132
- # character. First educational provider's organization OID, followed by
133
- # school code, group and role in the group.
134
- # For instance 1.2.246.562.10.12345678907;99900;7B;Oppilas.
139
+ # character. First municipality, followed by school code, group and role
140
+ # in the group.
141
+ # For instance Helsinki;32132;9A;Oppilas.
135
142
  # (multi value)
136
- #
137
- # The educational providers' organization OIDs can be found from:
138
- # https://github.com/Opetushallitus/aitu/blob/master/ttk-db/resources/db/migration/V11_2__koulutustoimijat.sql
139
143
  {
140
144
  name: 'urn:mpass.id:role',
141
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
142
- friendly_name: 'mpassRole'
143
- },
144
- # The educational provider's permanent organization OID.
145
- # (multi value)
146
- #
147
- # The educational providers' organization OIDs can be found from:
148
- # https://github.com/Opetushallitus/aitu/blob/master/ttk-db/resources/db/migration/V11_2__koulutustoimijat.sql
149
- {
150
- name: 'urn:mpass.id:educationProviderId',
151
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
152
- friendly_name: 'mpassEducationProviderOid'
145
+ name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri'
153
146
  },
154
- # The educational provider's human-readable name.
155
- # (multi value)
156
- {
157
- name: 'urn:mpass.id:educationProvider',
158
- name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
159
- friendly_name: 'mpassEducationProviderName'
160
- },
161
- # Combination of the education provider's organisation-OID and official
162
- # name. Separated by semicolon.
163
- # For instance: 1.2.246.562.10.494695390410;Virallinen nimi
164
- # (multi value)
165
147
  {
166
- name: 'urn:mpass.id:educationProviderInfo',
148
+ name: 'urn:educloudalliance.org:structuredRole',
167
149
  name_format: 'urn:oasis:names:tc:SAML:2.0:attrname-format:uri',
168
- friendly_name: 'mpassEducationProviderInfo'
150
+ friendly_name: 'ecaStructuredRole'
169
151
  }
170
152
  ]
171
153
 
@@ -176,8 +158,8 @@ module OmniAuth
176
158
  # Given name or all first names (in case given name is not found)
177
159
  first_name: ['urn:oid:2.5.4.42', 'http://eidas.europa.eu/attributes/naturalperson/CurrentGivenName'],
178
160
  last_name: ['urn:oid:2.5.4.4'],
179
- # The education provider (e.g. municipality) of the person (literal format in Finnish)
180
- location: ['urn:mpass.id:educationProvider']
161
+ # The municipality of the person (literal format in Finnish)
162
+ location: ['urn:mpass.id:municipality', 'urn:educloudalliance.org:municipality']
181
163
  )
182
164
 
183
165
  info do
@@ -215,14 +197,14 @@ module OmniAuth
215
197
  option(
216
198
  :saml_attributes_map,
217
199
  given_name: ['urn:oid:2.5.4.42'],
218
- first_names: ['urn:oid:2.5.4.42'],
200
+ first_names: ['http://eidas.europa.eu/attributes/naturalperson/CurrentGivenName'],
219
201
  last_name: ['urn:oid:2.5.4.4'],
220
- provider_id: {
221
- name: ['urn:mpass.id:educationProviderId'],
202
+ municipality_code: {
203
+ name: ['urn:mpass.id:municipalityCode'],
222
204
  type: :multi
223
205
  },
224
- provider_name: {
225
- name: ['urn:mpass.id:educationProvider'],
206
+ municipality_name: {
207
+ name: ['urn:mpass.id:municipality', 'urn:educloudalliance.org:municipality'],
226
208
  type: :multi
227
209
  },
228
210
  school_code: {
@@ -249,8 +231,7 @@ module OmniAuth
249
231
  name: ['urn:educloudalliance.org:role'],
250
232
  type: :multi
251
233
  },
252
- # Extra
253
- # Unique learner ID
234
+ # Extra (undocumented)
254
235
  funet_person_learner_id: ['urn:oid:1.3.6.1.4.1.16161.1.1.27']
255
236
  )
256
237
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module MPASSid
5
- VERSION = '0.3.1'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
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.3.1
4
+ version: 0.4.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: 2022-01-09 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-saml
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.3
19
+ version: '2.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.10.3
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement