oidc-provider
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -8,2 +8,3 @@ # oidc-provider CHANGELOG | ||
<!-- TOC START min:2 max:2 link:true update:true --> | ||
- [Version 1.2.0](#version-120) | ||
- [Version 1.1.0](#version-110) | ||
@@ -19,2 +20,8 @@ - [Version 1.0.3](#version-103) | ||
## Version 1.2.0 | ||
- [DIFF](https://github.com/panva/node-oidc-provider/compare/v1.1.0...v1.2.0) | ||
- account's `#claims()` can now return a promise | ||
- when acrValues passed in are empty the claim is not published as supported, the neither is | ||
acr_values_supported as it would be an empty array anyway | ||
## Version 1.1.0 | ||
@@ -21,0 +28,0 @@ - [DIFF](https://github.com/panva/node-oidc-provider/compare/v1.0.3...v1.1.0) |
@@ -52,5 +52,5 @@ 'use strict'; | ||
function idTokenHandler() { | ||
function* idTokenHandler() { | ||
const token = new IdToken( | ||
Object.assign({}, this.oidc.account.claims(), { | ||
Object.assign({}, yield Promise.resolve(this.oidc.account.claims()), { | ||
acr: this.oidc.acr, | ||
@@ -57,0 +57,0 @@ amr: this.oidc.amr, |
@@ -11,3 +11,3 @@ 'use strict'; | ||
this.body = { | ||
acr_values_supported: config.acrValues, | ||
acr_values_supported: config.acrValues.length ? config.acrValues : undefined, | ||
authorization_endpoint: this.oidc.urlFor('authorization'), | ||
@@ -14,0 +14,0 @@ claims_parameter_supported: !!config.features.claimsParameter, |
@@ -97,3 +97,3 @@ 'use strict'; | ||
const IdToken = provider.IdToken; | ||
const token = new IdToken(Object.assign({}, account.claims(), { | ||
const token = new IdToken(Object.assign({}, yield Promise.resolve(account.claims()), { | ||
acr: code.acr, | ||
@@ -100,0 +100,0 @@ amr: code.amr, |
@@ -56,3 +56,3 @@ 'use strict'; | ||
const token = new IdToken(Object.assign({}, account.claims(), { | ||
const token = new IdToken(Object.assign({}, yield Promise.resolve(account.claims()), { | ||
acr: refreshToken.acr, | ||
@@ -59,0 +59,0 @@ amr: refreshToken.amr, |
@@ -98,3 +98,4 @@ 'use strict'; | ||
const IdToken = provider.IdToken; | ||
const token = new IdToken(this.oidc.account.claims(), client.sectorIdentifier); | ||
const token = new IdToken(yield Promise.resolve(this.oidc.account.claims()), | ||
client.sectorIdentifier); | ||
@@ -110,3 +111,4 @@ token.scope = scope; | ||
} else { | ||
const mask = new Claims(this.oidc.account.claims(), client.sectorIdentifier); | ||
const mask = new Claims(yield Promise.resolve(this.oidc.account.claims()), | ||
client.sectorIdentifier); | ||
@@ -113,0 +115,0 @@ mask.scope(scope); |
@@ -73,2 +73,3 @@ 'use strict'; | ||
this.collectClaims(); | ||
this.removeAcrIfEmpty(); | ||
this.defaultSigAlg(); | ||
@@ -130,2 +131,8 @@ this.collectGrantTypes(); | ||
removeAcrIfEmpty() { | ||
if (!this.acrValues.length) { | ||
delete this.claims.acr; | ||
} | ||
} | ||
collectClaims() { | ||
@@ -132,0 +139,0 @@ this.claimsSupported = _.chain(this.scopes) |
@@ -66,3 +66,3 @@ { | ||
}, | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"files": [ | ||
@@ -69,0 +69,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
198576
4815