Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2024-08-20 13:21:38 +02:00
parent 5a59513d0b
commit 62e2684ecd
3 changed files with 23 additions and 3 deletions

View File

@ -109,8 +109,10 @@ class DomainlessFormattedURLValidator(DomainlessURLValidator):
self.schemes = ["http", "https", "blank"] + list(self.schemes)
__internal_models = []
def internal_model(cls):
setattr(cls, "__authentik_lib_internal_model", True)
__internal_models.append(cls)
return cls
@ -131,5 +133,5 @@ def excluded_models() -> list[type[Model]]:
UserObjectPermission,
]
return tuple(
static + [x for x in apps.get_models() if hasattr(x, "__authentik_lib_internal_model")]
static + [x for x in apps.get_models() if x in __internal_models]
)

View File

@ -29,7 +29,7 @@ CELERY_BEAT_SCHEDULE = {
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": (
"authentik.outposts.authentication.OutpostTokenAuthentication"
"authentik.outposts.authentication.OutpostTokenAuthentication",
"authentik.api.authentication.TokenAuthentication",
"rest_framework.authentication.SessionAuthentication",
),

View File

@ -42978,6 +42978,7 @@ components:
- $ref: '#/components/schemas/FlowErrorChallenge'
- $ref: '#/components/schemas/FrameChallenge'
- $ref: '#/components/schemas/IdentificationChallenge'
- $ref: '#/components/schemas/LoginChallenge'
- $ref: '#/components/schemas/OAuthDeviceCodeChallenge'
- $ref: '#/components/schemas/OAuthDeviceCodeFinishChallenge'
- $ref: '#/components/schemas/PasswordChallenge'
@ -43007,6 +43008,8 @@ components:
ak-stage-flow-error: '#/components/schemas/FlowErrorChallenge'
xak-flow-frame: '#/components/schemas/FrameChallenge'
ak-stage-identification: '#/components/schemas/IdentificationChallenge'
? ''
: '#/components/schemas/LoginChallenge'
ak-provider-oauth2-device-code: '#/components/schemas/OAuthDeviceCodeChallenge'
ak-provider-oauth2-device-code-finish: '#/components/schemas/OAuthDeviceCodeFinishChallenge'
ak-stage-password: '#/components/schemas/PasswordChallenge'
@ -47928,6 +47931,21 @@ components:
- debug
- notset
type: string
LoginChallenge:
type: object
description: Base class for extended login challenges
properties:
flow_info:
$ref: '#/components/schemas/ContextualFlowInfo'
component:
type: string
default: ''
response_errors:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/ErrorDetail'
LoginChallengeTypes:
oneOf:
- $ref: '#/components/schemas/RedirectChallenge'