oidc-provider
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -8,2 +8,3 @@ # oidc-provider CHANGELOG | ||
<!-- TOC START min:2 max:2 link:true update:true --> | ||
- [Version 1.0.3](#version-103) | ||
- [Version 1.0.2](#version-102) | ||
@@ -17,2 +18,7 @@ - [Version 1.0.1](#version-101) | ||
## Version 1.0.3 | ||
- [DIFF](https://github.com/panva/node-oidc-provider/compare/v1.0.2...v1.0.3) | ||
- fixes #36 - devInteractions feature rendering when mounted | ||
- ensure server_error is emitted for actions without a specific eventName | ||
## Version 1.0.2 | ||
@@ -19,0 +25,0 @@ - [DIFF](https://github.com/panva/node-oidc-provider/compare/v1.0.1...v1.0.2) |
@@ -6,2 +6,3 @@ 'use strict'; | ||
const instance = require('../helpers/weak_cache'); | ||
const views = require('../views'); | ||
@@ -48,3 +49,3 @@ const parseBody = bodyParser('application/x-www-form-urlencoded'); | ||
yield this.render(view, { | ||
const locals = { | ||
action, | ||
@@ -54,3 +55,7 @@ client, | ||
params: this.params, | ||
}); | ||
}; | ||
locals.body = views[view](locals); | ||
this.type = 'html'; | ||
this.body = views.layout(locals); | ||
}, | ||
@@ -57,0 +62,0 @@ ]), |
'use strict'; | ||
const koa = require('koa'); | ||
const path = require('path'); | ||
const render = require('koa-ejs'); | ||
const Router = require('koa-router'); | ||
@@ -134,8 +132,2 @@ const getCors = require('kcors'); | ||
const interaction = getInteraction(this); | ||
render(app, { | ||
cache: false, | ||
layout: '_layout', | ||
root: path.join(__dirname, '..', 'views'), | ||
}); | ||
get('/interaction/:grant', error(this), interaction.get); | ||
@@ -142,0 +134,0 @@ post('interaction', '/interaction/:grant/submit', error(this), interaction.post); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
module.exports = function getErrorHandler(provider, emittedError) { | ||
module.exports = function getErrorHandler(provider, eventName) { | ||
return function* apiErrorHandler(next) { | ||
@@ -31,4 +31,6 @@ try { | ||
if (emittedError) { | ||
provider.emit(out.error === 'server_error' ? 'server_error' : emittedError, err, this); | ||
if (out.error === 'server_error') { | ||
provider.emit('server_error', err, this); | ||
} else if (eventName) { | ||
provider.emit(eventName, err, this); | ||
} | ||
@@ -35,0 +37,0 @@ } |
@@ -7,2 +7,3 @@ { | ||
"buffer-equals-constant": "^1.0.0", | ||
"ejs": "^2.5.2", | ||
"got": "^6.1.1", | ||
@@ -14,3 +15,2 @@ "http-errors": "^1.4.0", | ||
"koa-compose": "^2.3.0", | ||
"koa-ejs": "^3.0.0", | ||
"koa-router": "^5.2.3", | ||
@@ -33,2 +33,3 @@ "lodash": "^4.5.0", | ||
"istanbul": "^0.4.3", | ||
"koa-ejs": "^3.0.0", | ||
"koa-mount": "^1.3.0", | ||
@@ -68,3 +69,3 @@ "koa-rewrite": "^1.1.1", | ||
}, | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"files": [ | ||
@@ -71,0 +72,0 @@ "lib" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195893
101
4754
16
+ Addedejs@^2.5.2
- Removedkoa-ejs@^3.0.0
- Removedco-from-stream@0.0.0(transitive)
- Removedco-fs@1.2.0(transitive)
- Removedco-read@0.0.1(transitive)
- Removedkoa-ejs@3.0.0(transitive)
- Removedthunkify@0.0.1(transitive)