|
|
@ -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)) |
|
|
|
} |
|
|
|