openid-client
Advanced tools
Comparing version 0.4.0 to 0.4.1
Following semver, 1.0.0 will mark the first API stable release and commence of this file, | ||
until then please use the compare views of github for reference. | ||
- https://github.com/panva/node-openid-client/compare/v0.3.0...v0.4.0 | ||
- https://github.com/panva/node-openid-client/compare/v0.3.0...v0.4.1 | ||
- fix: issuer with path component discovery | ||
- built-in signed and/or encrypted userinfo handling | ||
@@ -6,0 +7,0 @@ - authorizationCallback handling of implicit and hybrid responses |
'use strict'; | ||
const url = require('url'); | ||
const jose = require('node-jose'); | ||
@@ -19,2 +18,3 @@ const util = require('util'); | ||
const map = new WeakMap(); | ||
const registry = new Map(); | ||
@@ -28,2 +28,9 @@ let defaultHttpOptions = _.clone(DEFAULT_HTTP_OPTIONS); | ||
function stripTrailingSlash(uri) { | ||
if (uri && uri.endsWith('/')) { | ||
return uri.slice(0, -1); | ||
} | ||
return uri; | ||
} | ||
class Issuer { | ||
@@ -37,2 +44,4 @@ constructor(metadata) { | ||
registry.set(this.issuer, this); | ||
const self = this; | ||
@@ -53,2 +62,6 @@ | ||
static get registry() { | ||
return registry; | ||
} | ||
inspect() { | ||
@@ -96,4 +109,5 @@ return util.format('Issuer <%s>', this.issuer); | ||
static discover(uri) { | ||
uri = stripTrailingSlash(uri); // eslint-disable-line no-param-reassign | ||
const isWellKnown = uri.endsWith(WELL_KNOWN); | ||
const wellKnownUri = isWellKnown ? uri : url.resolve(uri, WELL_KNOWN); | ||
const wellKnownUri = isWellKnown ? uri : `${uri}${WELL_KNOWN}`; | ||
@@ -100,0 +114,0 @@ return got.get(wellKnownUri, this.httpOptions()) |
{ | ||
"name": "openid-client", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
34933
679