providers/proxy: fix redirect_uris not always being set on save
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
7bd8110984
commit
a74419214c
|
@ -53,8 +53,10 @@ class ProxyProviderSerializer(ProviderSerializer):
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
def update(self, instance: ProxyProvider, validated_data):
|
def update(self, instance: ProxyProvider, validated_data):
|
||||||
|
instance = super().update(instance, validated_data)
|
||||||
instance.set_oauth_defaults()
|
instance.set_oauth_defaults()
|
||||||
return super().update(instance, validated_data)
|
instance.save()
|
||||||
|
return instance
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ class ProxyProvider(OutpostModel, OAuth2Provider):
|
||||||
"""Ensure all OAuth2-related settings are correct"""
|
"""Ensure all OAuth2-related settings are correct"""
|
||||||
self.client_type = ClientTypes.CONFIDENTIAL
|
self.client_type = ClientTypes.CONFIDENTIAL
|
||||||
self.jwt_alg = JWTAlgorithms.RS256
|
self.jwt_alg = JWTAlgorithms.RS256
|
||||||
self.rsa_key = CertificateKeyPair.objects.first()
|
self.rsa_key = CertificateKeyPair.objects.exclude(key_data__iexact="").first()
|
||||||
scopes = ScopeMapping.objects.filter(
|
scopes = ScopeMapping.objects.filter(
|
||||||
scope_name__in=[
|
scope_name__in=[
|
||||||
SCOPE_OPENID,
|
SCOPE_OPENID,
|
||||||
|
|
Reference in a new issue