Report OIDC errors to output
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2021-12-03 02:45:02 -06:00
parent dae06aa577
commit fd8a05446a

View File

@ -58,6 +58,15 @@ class OpenIDConnectUnit extends Unit {
...configuration, ...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 if ( configuration.proxy ) this.provider.proxy = true
app.express.use('/oidc', this.wrap(this.provider.callback)) app.express.use('/oidc', this.wrap(this.provider.callback))
} }