diff options
author | Ralph Krimmel | 2019-11-28 10:59:59 +0100 |
---|---|---|
committer | Ralph Krimmel | 2019-11-28 10:59:59 +0100 |
commit | e0a88727423dfdb24e09f4e7e69cae718a7de127 (patch) | |
tree | e8251f97f4d169813821d2f73034af201bb104f1 /lib/web/auth/saml | |
parent | 3e8cf5778f6aaa149a45aec25e2ec6de5d6048e3 (diff) |
Moving the storage of referrer information to main authorization check instead of doing it in the authentication source
Signed-off-by: Ralph Krimmel <rkrimme1@gwdg.de>
Diffstat (limited to 'lib/web/auth/saml')
-rw-r--r-- | lib/web/auth/saml/index.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/web/auth/saml/index.js b/lib/web/auth/saml/index.js index dd274814..40a6f8b3 100644 --- a/lib/web/auth/saml/index.js +++ b/lib/web/auth/saml/index.js @@ -7,7 +7,6 @@ const config = require('../../../config') const models = require('../../../models') const logger = require('../../../logger') const { urlencodedParser } = require('../../utils') -const { setReturnToFromReferer } = require('../utils') const fs = require('fs') const intersection = function (array1, array2) { return array1.filter((n) => array2.includes(n)) } @@ -77,13 +76,12 @@ passport.use(new SamlStrategy({ }) })) -samlAuth.get('/auth/saml', function (req, res, next) { - setReturnToFromReferer(req) +samlAuth.get('/auth/saml', passport.authenticate('saml', { successReturnToOrRedirect: config.serverURL + '/', failureRedirect: config.serverURL + '/' - })(req, res, next) -}) + }) +) samlAuth.post('/auth/saml/callback', urlencodedParser, passport.authenticate('saml', { |