Read OIDC issuer from the OIDC discovery document, if present

This commit is contained in:
Joseph Schorr 2017-04-07 11:39:34 -04:00
parent ed3da4697f
commit 002972fc2f

View file

@ -141,7 +141,11 @@ class OIDCLoginService(OAuthService):
@property @property
def _issuer(self): def _issuer(self):
return self.config.get('OIDC_ISSUER', self.config['OIDC_SERVER']) # Read the issuer from the OIDC config, falling back to the configured OIDC server.
issuer = self._oidc_config().get('issuer', self.config['OIDC_SERVER'])
# If specified, use the overridden OIDC issuer.
return self.config.get('OIDC_ISSUER', issuer)
@lru_cache(maxsize=1) @lru_cache(maxsize=1)
def _oidc_config(self): def _oidc_config(self):