Browse Source

Report OIDC errors to output

master
Garrett Mills 7 months ago
parent
commit
fd8a05446a
  1. 9
      app/unit/OpenIDConnectUnit.js

9
app/unit/OpenIDConnectUnit.js

@ -58,6 +58,15 @@ class OpenIDConnectUnit extends Unit {
...configuration,
})
const reportError = ({ headers: { authorization }, oidc: { body, client } }, err) => {
this.output.error('OpenIDConnect authorization error!')
this.output.error(err)
}
this.provider.on('grant.error', reportError)
this.provider.on('introspection.error', reportError)
this.provider.on('revocation.error', reportError)
if ( configuration.proxy ) this.provider.proxy = true
app.express.use('/oidc', this.wrap(this.provider.callback))
}

Loading…
Cancel
Save