Split federation OpenID userinfo endpoint out of the federation resource

This allows the OpenID userinfo endpoint to be active even if the
federation resource is not active. The OpenID userinfo endpoint
is called by integration managers to verify user actions using the
client API OpenID access token. Without this verification, the
integration manager cannot know that the access token is valid.

The OpenID userinfo endpoint will be loaded in the case that either
"federation" or "openid" resource is defined. The new "openid"
resource is defaulted to active in default configuration.

Signed-off-by: Jason Robinson <jasonr@matrix.org>
This commit is contained in:
Jason Robinson 2019-01-21 01:54:43 +02:00
parent 5336e49b39
commit 82e13662c0
4 changed files with 89 additions and 42 deletions

View file

@ -151,7 +151,7 @@ class ServerConfig(Config):
"compress": gzip_responses,
},
{
"names": ["federation"],
"names": ["federation", "openid"],
"compress": False,
}
]
@ -170,7 +170,7 @@ class ServerConfig(Config):
"compress": gzip_responses,
},
{
"names": ["federation"],
"names": ["federation", "openid"],
"compress": False,
}
]
@ -328,7 +328,7 @@ class ServerConfig(Config):
# that can do automatic compression.
compress: true
- names: [federation] # Federation APIs
- names: [federation, openid] # Federation APIs
compress: false
# optional list of additional endpoints which can be loaded via
@ -350,7 +350,7 @@ class ServerConfig(Config):
resources:
- names: [client]
compress: true
- names: [federation]
- names: [federation, openid]
compress: false
# Turn on the twisted ssh manhole service on localhost on the given
@ -477,6 +477,7 @@ KNOWN_RESOURCES = (
'keys',
'media',
'metrics',
'openid',
'replication',
'static',
'webclient',