mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 12:46:39 +00:00
fix kanidm token bug
This commit is contained in:
parent
73359af512
commit
178afef625
|
@ -3,7 +3,7 @@ from typing import Any, Optional, Union
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
import requests # type: ignore
|
import requests
|
||||||
|
|
||||||
from selfprivacy_api.models.group import Group
|
from selfprivacy_api.models.group import Group
|
||||||
from selfprivacy_api.repositories.users.exceptions import (
|
from selfprivacy_api.repositories.users.exceptions import (
|
||||||
|
@ -62,7 +62,7 @@ class KanidmAdminToken:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get() -> str:
|
def get() -> str:
|
||||||
kanidm_admin_token = str(redis.get(REDIS_TOKEN_KEY))
|
kanidm_admin_token: str | None = redis.get(REDIS_TOKEN_KEY) # type: ignore
|
||||||
|
|
||||||
if kanidm_admin_token is None or not KanidmAdminToken._is_token_valid(
|
if kanidm_admin_token is None or not KanidmAdminToken._is_token_valid(
|
||||||
kanidm_admin_token
|
kanidm_admin_token
|
||||||
|
|
Loading…
Reference in a new issue