-
Notifications
You must be signed in to change notification settings - Fork 5
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
stefanpante
wants to merge
75
commits into
master
Choose a base branch
from
v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
V2 #24
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 9b16be5
fix bugs & update inner workings
stefanpante 245e3b7
updated readm
stefanpante feba122
add trust proxy
stefanpante cec6ad1
fix authentication methods table
stefanpante 5543486
fix authentication methods table
stefanpante 668aa74
update readme and use hooks
stefanpante 15be8dc
update readme and use hooks
stefanpante 3b25a1f
- update readme
stefanpante 17a4ad1
remove unused dependencies & files
stefanpante fbc54e5
2.0.0-0
stefanpante 43a61f7
change build plan to support down till 8
stefanpante 9243327
fix casing
stefanpante d1b07de
2.0.0-1
stefanpante 950cc0d
wrong default causes problems (should be array instead of string)
stefanpante fae9150
Use default authentication method in SSO redirect URL for low session…
PrinceAnsong df88bb6
2.0.0-2
stefanpante 906f75b
Fix typo in highest assurance level search loop (#26)
PrinceAnsong c21aa08
Fix naming of authentication method param during logout
PrinceAnsong 3758b4d
Merge pull request #27 from PrinceAnsong/bugfix/fix-renamed-authentic…
Jan-Bart 249b584
Version bump
Jan-Bart d2a0abe
2.0.0-4
Jan-Bart c3346de
Delete sessions after successful logout instead of before logout
PrinceAnsong 1964474
Merge pull request #28 from PrinceAnsong/bugfix/delete-sessions-after…
Jan-Bart ae15cfd
2.0.0-5
Jan-Bart 3c24236
hinted login is workiung (#32)
stefanpante 0f47412
2.1.0
stefanpante 757ecf1
add logger
stefanpante 31081d2
2.1.1-0
stefanpante 5222193
add debug info
stefanpante 2e0add8
2.1.1-1
stefanpante 76ab0ff
update logging
stefanpante f6297eb
2.1.1-2
stefanpante 65bb907
add additional login, change itsme to high
stefanpante 377cfde
2.1.1-3
stefanpante 672adce
revert itsme to high
stefanpante f6f11eb
2.1.1-4
stefanpante 17ce05e
add logs to sso middleware
stefanpante b375496
give users the ability to seit save_consent to false
stefanpante 4de0437
2.1.1
stefanpante 81c01cc
2.2.0
stefanpante 56a0ba7
add force auth param
stefanpante 95dbb4f
2.3.0
stefanpante f0c4395
iam-aprofiel-phone method
vademo 837eeb8
Merge pull request #53 from digipolisantwerp/feature/v2AddAuthMethod
Jan-Bart d35431c
2.3.1
Jan-Bart 379e150
Update package.lock + add dist folder for release
Jan-Bart cd3590b
Added dist
Jan-Bart 4f7cad0
🔧 Added publishConfig to prevent publishing to internal registry
Jan-Bart d9b4a53
Fix auth_method astad.aprofiel.v1
Jan-Bart 8d53a09
2.3.3
Jan-Bart 35ad62c
Added test and documentation upgrade
Jan-Bart dcf7f1f
2.3.4
Jan-Bart 72524cb
Merge pull request #55 from digipolisantwerp/bug/ACAPP-434
Jan-Bart 28c8e97
chore: update dependencies + add lintr + add github workflows
horstenwillem fe6ded4
add Typescript types
horstenwillem 9f56c3f
add .github folder to npmignore
horstenwillem 756ee58
Merge pull request #61 from horstenwillem/chore/maintenance
Jan-Bart 4da4b53
Add configurable fromUrl domain check
osamah-dgp b950b41
Fix syntax error in readme docs
osamah-dgp 5a5704b
Fix linting issues
osamah-dgp b97e906
Add test checking fromUrl logic, fix existing tests, add invalid url …
osamah-dgp 81d6dd8
Merge pull request #72 from osamah-dgp/ASTAD-28445-open-redirect-issu…
Jan-Bart 4ff199e
2.4.0
Jan-Bart 9d71102
Updated changelog
Jan-Bart efeb6cb
Fix ts issues
osamah-dgp c56fdb6
Small lint fix
osamah-dgp 9acbf7d
Add minimum node 15 requirement
osamah-dgp b076602
Merge pull request #73 from osamah-dgp/ASTAD-28445-open-redirect-issu…
Jan-Bart a3aa530
Updated lock-file
Jan-Bart 4785a8e
2.4.1
Jan-Bart 191786d
Add crash handler to failed refresh calls and additional error logging
osamah-dgp 27447ff
Lint fixes
osamah-dgp 096f06d
Merge pull request #74 from osamah-dgp/ASTAD-28488-crash-fixes
Jan-Bart 1dbff22
2.4.2
Jan-Bart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@istanbuljs/nyc-config-babel" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "6" | ||
- "8" | ||
- "10" | ||
- "11" | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
|
@@ -9,7 +10,7 @@ let { | |
auth: authConfig, | ||
mongoConnectionString, | ||
port = 2000 | ||
} = require('./config'); | ||
} = require('./old-config'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does te example use an old config ? |
||
|
||
|
||
const app = express(); | ||
|
@@ -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}`)); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?