Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt 2023-12-28 14:40:39 +01:00
parent 7c639d5429
commit d0d3ae9218
No known key found for this signature in database
GPG Key ID: 9C3FA22FABF1AA8D
2 changed files with 4 additions and 1 deletions

View File

@ -1,9 +1,9 @@
"""Recovery helper functions."""
from datetime import datetime from datetime import datetime
from django.urls import reverse from django.urls import reverse
from django.utils.text import slugify from django.utils.text import slugify
from django.utils.timezone import now from django.utils.timezone import now
from rest_framework.request import Request
from authentik.core.models import Group, Token, TokenIntents, User from authentik.core.models import Group, Token, TokenIntents, User

View File

@ -56,17 +56,20 @@ class TenantSerializer(ModelSerializer):
class TenantAdminGroupRequestSerializer(PassiveSerializer): class TenantAdminGroupRequestSerializer(PassiveSerializer):
"""Tenant admin group creation request serializer""" """Tenant admin group creation request serializer"""
user = CharField() user = CharField()
class TenantRecoveryKeyRequestSerializer(PassiveSerializer): class TenantRecoveryKeyRequestSerializer(PassiveSerializer):
"""Tenant recovery key creation request serializer""" """Tenant recovery key creation request serializer"""
user = CharField() user = CharField()
duration_days = IntegerField(initial=365) duration_days = IntegerField(initial=365)
class TenantRecoveryKeyResponseSerializer(PassiveSerializer): class TenantRecoveryKeyResponseSerializer(PassiveSerializer):
"""Tenant recovery key creation response serializer""" """Tenant recovery key creation response serializer"""
expiry = DateTimeField() expiry = DateTimeField()
url = CharField() url = CharField()