@opengovsg/mockpass 3.1.1 → 3.1.2

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.
@@ -6,7 +6,7 @@ on:
6
6
  jobs:
7
7
  ci:
8
8
  name: CI
9
- runs-on: ubuntu-18.04
9
+ runs-on: ubuntu-latest
10
10
  steps:
11
11
  - uses: actions/checkout@v2
12
12
  - name: Use Node.js
@@ -167,6 +167,40 @@ function config(app, { showLoginPage, serviceProvider }) {
167
167
  jwk.use = 'sig'
168
168
  res.json({ keys: [jwk] })
169
169
  })
170
+
171
+ app.get('/.well-known/openid-configuration', async (req, res) => {
172
+ const issuer = `${req.protocol}://${req.get('host')}`
173
+
174
+ res.json({
175
+ issuer,
176
+ authorization_endpoint: `${issuer}/${PATH_PREFIX}/authorize`,
177
+ token_endpoint: `${issuer}/${PATH_PREFIX}/token`,
178
+ userinfo_endpoint: `${issuer}/${PATH_PREFIX}/userinfo`,
179
+ jwks_uri: `${issuer}/.well-known/jwks.json`,
180
+ response_types_supported: ['code'],
181
+ grant_types_supported: ['authorization_code'],
182
+ scopes_supported: [
183
+ 'openid',
184
+ 'myinfo.nric_number',
185
+ 'myinfo.name',
186
+ 'myinfo.email',
187
+ 'myinfo.sex',
188
+ 'myinfo.race',
189
+ 'myinfo.mobile_number',
190
+ 'myinfo.registered_address',
191
+ 'myinfo.date_of_birth',
192
+ 'myinfo.passport_number',
193
+ 'myinfo.passport_expiry_date',
194
+ 'myinfo.nationality',
195
+ 'myinfo.residentialstatus',
196
+ 'myinfo.residential',
197
+ 'myinfo.housingtype',
198
+ 'myinfo.hdbtype',
199
+ ],
200
+ id_token_signing_alg_values_supported: ['RS256'],
201
+ subject_types_supported: ['pairwise'],
202
+ })
203
+ })
170
204
  }
171
205
 
172
206
  module.exports = config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengovsg/mockpass",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "A mock SingPass/CorpPass server for dev purposes",
5
5
  "main": "index.js",
6
6
  "bin": {