Skip to content
Snippets Groups Projects
Commit ca025823 authored by Ben Adida's avatar Ben Adida Committed by Lloyd Hilaiel
Browse files

Postel - be liberal in what you accept. Allowing verify calls that are a mix of POST and GET

parent 702e169f
No related branches found
No related tags found
No related merge requests found
......@@ -71,8 +71,8 @@ app.use(express.bodyParser());
app.post('/verify', function(req, resp, next) {
req.body = req.body || {}
var assertion = req.body.assertion;
var audience = req.body.audience;
var assertion = (req.query && req.query.assertion) ? req.query.assertion : req. body.assertion;
var audience = (req.query && req.query.audience) ? req.query.audience : req.body.audience;
if (!(assertion && audience))
return resp.json({ status: "failure", reason: "need assertion and audience" });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment