diff --git a/authentik/flows/challenge.py b/authentik/flows/challenge.py index d2ed89ac2..9f45da474 100644 --- a/authentik/flows/challenge.py +++ b/authentik/flows/challenge.py @@ -65,6 +65,26 @@ class ShellChallenge(Challenge): body = CharField() +class WithUserInfoChallenge(Challenge): + """Challenge base which shows some user info""" + + pending_user = CharField() + pending_user_avatar = CharField() + + +class PermissionSerializer(Serializer): + """Permission used for consent""" + + name = CharField() + id = CharField() + + def create(self, validated_data: dict) -> Model: + return Model() + + def update(self, instance: Model, validated_data: dict) -> Model: + return Model() + + class ChallengeResponse(Serializer): """Base class for all challenge responses""" diff --git a/authentik/providers/oauth2/templates/providers/oauth2/consent.html b/authentik/providers/oauth2/templates/providers/oauth2/consent.html deleted file mode 100644 index 6dea2e852..000000000 --- a/authentik/providers/oauth2/templates/providers/oauth2/consent.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends 'login/form_with_user.html' %} - -{% load i18n %} - -{% block beneath_form %} -
- {% blocktrans with name=context.application.name %} - You're about to sign into {{ name }}. - {% endblocktrans %} -
-{% trans "Application requires following permissions" %}
-- {% blocktrans with name=context.application.name %} - You're about to sign into {{ name }}. - {% endblocktrans %} -
- {{ hidden_inputs }} -