providers/app_gw: fix Client scopes and URLs

This commit is contained in:
Jens Langhammer 2020-08-01 20:33:38 +02:00
parent 2fd00c6c9d
commit 7897ca4744
2 changed files with 4 additions and 5 deletions

View File

@ -20,12 +20,10 @@ class ApplicationGatewayProviderForm(forms.ModelForm):
[ResponseType.objects.get_by_natural_key("code")]
)
self.instance.client.redirect_uris = [
f"http://{self.instance.external_host}/oauth2/callback",
f"https://{self.instance.external_host}/oauth2/callback",
f"http://{self.instance.internal_host}/oauth2/callback",
f"https://{self.instance.internal_host}/oauth2/callback",
f"{self.instance.external_host}/oauth2/callback",
f"{self.instance.internal_host}/oauth2/callback",
]
self.instance.client.scope = ["openid", "email"]
self.instance.client.scope = ["openid", "email", "profile"]
self.instance.client.save()
return super().save(*args, **kwargs)

View File

@ -377,6 +377,7 @@ _LOGGING_HANDLER_MAP = {
"oidc_provider": LOG_LEVEL,
"docker": "WARNING",
"urllib3": "WARNING",
"elasticapm": "WARNING",
}
for handler_name, level in _LOGGING_HANDLER_MAP.items():
# pyright: reportGeneralTypeIssues=false