Skip to content

Commit

Permalink
feat: discovery must now always be enabled
Browse files Browse the repository at this point in the history
BREAKING CHANGE: removed features.discovery and it is now always-on, no
point in disabling discovery, ever.
  • Loading branch information
panva committed May 19, 2019
1 parent ec1f2e8 commit 5c3c0c7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 32 deletions.
15 changes: 0 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ If you or your business use oidc-provider, please consider becoming a [Patron][s
- [clientCredentials](#featuresclientcredentials)
- [devInteractions](#featuresdevinteractions)
- [deviceFlow](#featuresdeviceflow)
- [discovery](#featuresdiscovery)
- [encryption](#featuresencryption)
- [frontchannelLogout](#featuresfrontchannellogout)
- [introspection](#featuresintrospection)
Expand Down Expand Up @@ -985,20 +984,6 @@ html>`;

</details>

### features.discovery

[Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html)

Exposes `/.well-known/openid-configuration` endpoint with your provider's actual configuration, i.e. Available claims, features and so on.


_**default value**_:
```js
{
enabled: true
}
```

### features.encryption

Enables encryption features such as receiving encrypted UserInfo responses, encrypted ID Tokens and allow receiving encrypted Request Objects.
Expand Down
10 changes: 0 additions & 10 deletions lib/helpers/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,6 @@ const DEFAULTS = {
*/
devInteractions: { enabled: true },

/*
* features.discovery
*
* title: [Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html)
*
* description: Exposes `/.well-known/openid-configuration` endpoint with your provider's actual
* configuration, i.e. available claims, features and so on.
*/
discovery: { enabled: true },

/*
* features.requestUri
*
Expand Down
2 changes: 0 additions & 2 deletions lib/helpers/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ const STABLE = new Set([
'claimsParameter',
'clientCredentials',
'devInteractions',
'discovery',
'encryption',
'introspection',
'pkce',
'registration',
'registrationManagement',
'request',
Expand Down
8 changes: 3 additions & 5 deletions lib/helpers/initialize_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ module.exports = function initializeApp() {
get('certificates', routes.certificates, CORS.open, error(this, 'certificates.error'), certificates);
options('cors.certificates', routes.certificates, CORS.open);

get('discovery', discoveryRoute, CORS.open, error(this, 'discovery.error'), discovery);
options('cors.discovery', discoveryRoute, CORS.open);

if (configuration.features.registration.enabled) {
const clientRoute = `${routes.registration}/:clientId`;

Expand All @@ -177,11 +180,6 @@ module.exports = function initializeApp() {
options('cors.introspection', routes.introspection, CORS.client);
}

if (configuration.features.discovery.enabled) {
get('discovery', discoveryRoute, CORS.open, error(this, 'discovery.error'), discovery);
options('cors.discovery', discoveryRoute, CORS.open);
}

if (configuration.features.sessionManagement.enabled) {
get('check_session', routes.check_session, error(this, 'check_session.error'), checkSession.get);
post('check_session_origin', routes.check_session, error(this, 'check_session_origin.error'), ...checkSession.post);
Expand Down

0 comments on commit 5c3c0c7

Please sign in to comment.