Report OIDC errors to output
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
dae06aa577
commit
fd8a05446a
@ -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))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user