Skip to content

Commit

Permalink
fix: devInteractions also have no-cache headers, doesn't set acr
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Sep 26, 2018
1 parent 6788b83 commit 9d7a032
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/actions/interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const bodyParser = require('../shared/selective_body');
const views = require('../views');
const instance = require('../helpers/weak_cache');
const epochTime = require('../helpers/epoch_time');
const noCache = require('../shared/no_cache');

const parseBody = bodyParser('application/x-www-form-urlencoded');

Expand All @@ -20,6 +21,7 @@ you are expected to disable these interactions and provide your own');

return {
get: [
noCache,
async function interactionRender(ctx, next) {
ctx.oidc.uuid = ctx.params.grant;
const details = await provider.interactionDetails(ctx.req);
Expand Down Expand Up @@ -53,6 +55,7 @@ you are expected to disable these interactions and provide your own');
},
],
post: [
noCache,
parseBody,
async function interactionSubmit(ctx, next) {
ctx.oidc.uuid = ctx.params.grant;
Expand All @@ -61,7 +64,6 @@ you are expected to disable these interactions and provide your own');
await provider.interactionFinished(ctx.req, ctx.res, {
login: {
account: ctx.oidc.body.login,
acr: '1',
remember: !!ctx.oidc.body.remember,
ts: epochTime(),
},
Expand Down

0 comments on commit 9d7a032

Please sign in to comment.