Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #24

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open

V2 #24

Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
83496ec
refactor && add sessionStore functionality && sso
stefanpante Feb 12, 2020
9b16be5
fix bugs & update inner workings
stefanpante Feb 25, 2020
245e3b7
updated readm
stefanpante Feb 25, 2020
feba122
add trust proxy
stefanpante Feb 25, 2020
cec6ad1
fix authentication methods table
stefanpante Feb 25, 2020
5543486
fix authentication methods table
stefanpante Feb 25, 2020
668aa74
update readme and use hooks
stefanpante Feb 26, 2020
15be8dc
update readme and use hooks
stefanpante Feb 26, 2020
3b25a1f
- update readme
stefanpante Feb 27, 2020
17a4ad1
remove unused dependencies & files
stefanpante Feb 27, 2020
fbc54e5
2.0.0-0
stefanpante Feb 27, 2020
43a61f7
change build plan to support down till 8
stefanpante Mar 3, 2020
9243327
fix casing
stefanpante Mar 3, 2020
d1b07de
2.0.0-1
stefanpante Mar 3, 2020
950cc0d
wrong default causes problems (should be array instead of string)
stefanpante Mar 9, 2020
fae9150
Use default authentication method in SSO redirect URL for low session…
PrinceAnsong Apr 6, 2020
df88bb6
2.0.0-2
stefanpante Apr 6, 2020
906f75b
Fix typo in highest assurance level search loop (#26)
PrinceAnsong Apr 7, 2020
c21aa08
Fix naming of authentication method param during logout
PrinceAnsong Jun 11, 2020
3758b4d
Merge pull request #27 from PrinceAnsong/bugfix/fix-renamed-authentic…
Jan-Bart Jun 11, 2020
249b584
Version bump
Jan-Bart Jun 11, 2020
d2a0abe
2.0.0-4
Jan-Bart Jun 11, 2020
c3346de
Delete sessions after successful logout instead of before logout
PrinceAnsong Jun 18, 2020
1964474
Merge pull request #28 from PrinceAnsong/bugfix/delete-sessions-after…
Jan-Bart Jun 19, 2020
ae15cfd
2.0.0-5
Jan-Bart Jun 22, 2020
3c24236
hinted login is workiung (#32)
stefanpante Apr 29, 2021
0f47412
2.1.0
stefanpante Apr 29, 2021
757ecf1
add logger
stefanpante Jun 8, 2021
31081d2
2.1.1-0
stefanpante Jun 8, 2021
5222193
add debug info
stefanpante Jun 8, 2021
2e0add8
2.1.1-1
stefanpante Jun 8, 2021
76ab0ff
update logging
stefanpante Jun 8, 2021
f6297eb
2.1.1-2
stefanpante Jun 8, 2021
65bb907
add additional login, change itsme to high
stefanpante Jun 8, 2021
377cfde
2.1.1-3
stefanpante Jun 8, 2021
672adce
revert itsme to high
stefanpante Jun 8, 2021
f6f11eb
2.1.1-4
stefanpante Jun 8, 2021
17ce05e
add logs to sso middleware
stefanpante Jun 21, 2021
b375496
give users the ability to seit save_consent to false
stefanpante Nov 18, 2021
4de0437
2.1.1
stefanpante Nov 18, 2021
81c01cc
2.2.0
stefanpante Nov 18, 2021
56a0ba7
add force auth param
stefanpante Nov 30, 2021
95dbb4f
2.3.0
stefanpante Nov 30, 2021
f0c4395
iam-aprofiel-phone method
vademo May 23, 2022
837eeb8
Merge pull request #53 from digipolisantwerp/feature/v2AddAuthMethod
Jan-Bart May 31, 2022
d35431c
2.3.1
Jan-Bart Jun 28, 2022
379e150
Update package.lock + add dist folder for release
Jan-Bart Aug 11, 2022
cd3590b
Added dist
Jan-Bart Aug 11, 2022
4f7cad0
🔧 Added publishConfig to prevent publishing to internal registry
Jan-Bart Aug 11, 2022
d9b4a53
Fix auth_method astad.aprofiel.v1
Jan-Bart Nov 17, 2022
8d53a09
2.3.3
Jan-Bart Nov 17, 2022
35ad62c
Added test and documentation upgrade
Jan-Bart Nov 17, 2022
dcf7f1f
2.3.4
Jan-Bart Nov 17, 2022
72524cb
Merge pull request #55 from digipolisantwerp/bug/ACAPP-434
Jan-Bart Nov 17, 2022
28c8e97
chore: update dependencies + add lintr + add github workflows
horstenwillem Jan 30, 2023
fe6ded4
add Typescript types
horstenwillem Jan 30, 2023
9f56c3f
add .github folder to npmignore
horstenwillem Jan 30, 2023
756ee58
Merge pull request #61 from horstenwillem/chore/maintenance
Jan-Bart Aug 16, 2023
4da4b53
Add configurable fromUrl domain check
osamah-dgp Feb 15, 2024
b950b41
Fix syntax error in readme docs
osamah-dgp Feb 15, 2024
5a5704b
Fix linting issues
osamah-dgp Feb 15, 2024
b97e906
Add test checking fromUrl logic, fix existing tests, add invalid url …
osamah-dgp Feb 15, 2024
81d6dd8
Merge pull request #72 from osamah-dgp/ASTAD-28445-open-redirect-issu…
Jan-Bart Feb 15, 2024
4ff199e
2.4.0
Jan-Bart Feb 19, 2024
9d71102
Updated changelog
Jan-Bart Feb 19, 2024
efeb6cb
Fix ts issues
osamah-dgp Feb 20, 2024
c56fdb6
Small lint fix
osamah-dgp Feb 20, 2024
9acbf7d
Add minimum node 15 requirement
osamah-dgp Feb 20, 2024
b076602
Merge pull request #73 from osamah-dgp/ASTAD-28445-open-redirect-issu…
Jan-Bart Feb 20, 2024
a3aa530
Updated lock-file
Jan-Bart Feb 20, 2024
4785a8e
2.4.1
Jan-Bart Feb 20, 2024
191786d
Add crash handler to failed refresh calls and additional error logging
osamah-dgp Mar 6, 2024
27447ff
Lint fixes
osamah-dgp Mar 6, 2024
096f06d
Merge pull request #74 from osamah-dgp/ASTAD-28488-crash-fixes
Jan-Bart Mar 7, 2024
1dbff22
2.4.2
Jan-Bart Mar 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "8"
}
}
]
],
"env": {
"test": {
"plugins": ["istanbul"]
}
}
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

dist/
# Editors
*.sublime*
nbproject/*
Expand All @@ -44,3 +44,4 @@ nbproject/*
# Sass /
**\.sass-cache
Gemfile.lock
.env
3 changes: 3 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@istanbuljs/nyc-config-babel"
}
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: node_js

node_js:
- "6"
- "8"
- "10"
- "11"

Expand Down
Binary file added assets/config-event.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/consent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/create-contract.png
Binary file not shown.
Binary file added assets/eventhandler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/shared-identity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 21 additions & 25 deletions examples/basic-mongo/config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
module.exports = {
mongoConnectionString: process.env.MONGO_CONNECTIONSTRING || 'mongodb://localhost:27017/basic-mongo-auth',
port: process.env.PORT || '2000',
session:{
name: process.env.SESSION_NAME || 'authsessionid',
secret: process.env.SESSION_SECRET || 'thisisthesessionsecretusedtosigncookie',
resave: false,
saveUninitialized: true,
},
auth: {
oauthHost: process.env.OAUTH_HOST || 'https://api-oauth2-o.antwerpen.be',
apiHost: process.env.API_HOST || 'https://api-gw-o.antwerpen.be',
errorRedirect: process.env.AUTH_ERROR_REDIRECT || '/',
basePath: process.env.AUTH_BASEPATH || '/auth',
auth: {
clientId: process.env.CLIENT_ID || 'your-client-id',
clientSecret: process.env.CLIENT_SECRET || 'your-client-secret',
'@digipolis/auth': {
basePath: '/auth',
clientId: process.env.CLIENT_ID || 'your-client-id',
clientSecret: process.env.CLIENT_SECRET || 'your-client-secret',
oauthHost: 'https://api-oauth2-a.antwerpen.be',
consentUrl: 'https://api-gw-a.antwerpen.be/acpaas/consent/v1',
scopeGroups: {
personalInformation: [
'astad.aprofiel.v1.avatar',
'astad.aprofiel.v1.email',
],
high: ['crspersoon.nationalnumber']
},
serviceProviders: {
aprofiel: {
scopes: process.env.APROFIEL_SCOPES || 'username',
url: process.env.APROFIEL_URL || 'https://api-gw-o.antwerpen.be/astad/aprofiel/v1/v1/me',
identifier: process.env.APROFIEL_IDENTIFIER || 'astad.aprofiel.v1',
tokenUrl: process.env.APROFIEL_TOKENURL || 'https://api-gw-o.antwerpen.be/astad/aprofiel/v1/oauth2/token',
hooks: {
loginSuccess: [],
logoutSuccess: []
defaultScopes: ['astad.aprofiel.v1.name',],
url: 'https://api-gw-a.antwerpen.be/acpaas/shared-identity-data/v1',
hooks: {
loginSuccess: [
(req, res, next) => {
req.session.user.hookTest = 'hello';
return next();
}
}
]
}
}
}
}
2 changes: 2 additions & 0 deletions examples/basic-mongo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ services:
environment:
- PORT=2000
- MONGO_CONNECTIONSTRING=mongodb://mongo:27017/basic-mongo-auth
- CLIENT_SECRET=
- CLIENT_ID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misschien handig om in te vullen met dummy code?

ports:
- 2000:2000
links:
Expand Down
5 changes: 3 additions & 2 deletions examples/basic-mongo/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This is example is v1
const express = require('express');
const connectMongo = require('connect-mongo');
const session = require('express-session');
Expand All @@ -9,7 +10,7 @@ let {
auth: authConfig,
mongoConnectionString,
port = 2000
} = require('./config');
} = require('./old-config');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does te example use an old config ?



const app = express();
Expand All @@ -30,4 +31,4 @@ sessionConfig = Object.assign(sessionConfig, {
app.use(session(sessionConfig));
app.use(auth(app, authConfig));

app.listen(port, () => console.log(`express server listening on port ${port}`));
app.listen(port, () => console.log(`express server listening on port ${port}`));
Loading