providers/oauth2: deepmerge claims
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4709dca33c
commit
3e26170f4b
|
@ -1,6 +1,7 @@
|
||||||
"""authentik OAuth2 OpenID Userinfo views"""
|
"""authentik OAuth2 OpenID Userinfo views"""
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from deepmerge import always_merger
|
||||||
from django.http import HttpRequest, HttpResponse
|
from django.http import HttpRequest, HttpResponse
|
||||||
from django.http.response import HttpResponseBadRequest
|
from django.http.response import HttpResponseBadRequest
|
||||||
from django.views import View
|
from django.views import View
|
||||||
|
@ -78,7 +79,7 @@ class UserInfoView(View):
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
LOGGER.debug("updated scope", scope=scope)
|
LOGGER.debug("updated scope", scope=scope)
|
||||||
final_claims.update(value)
|
always_merger.merge(final_claims, value)
|
||||||
return final_claims
|
return final_claims
|
||||||
|
|
||||||
def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse:
|
def dispatch(self, request: HttpRequest, *args: Any, **kwargs: Any) -> HttpResponse:
|
||||||
|
|
Reference in New Issue