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

View File

@ -31,6 +31,7 @@ from authentik.flows.challenge import (
ChallengeResponse, ChallengeResponse,
FlowErrorChallenge, FlowErrorChallenge,
HttpChallengeResponse, HttpChallengeResponse,
LoginChallenge,
RedirectChallenge, RedirectChallenge,
ShellChallenge, ShellChallenge,
WithUserInfoChallenge, WithUserInfoChallenge,
@ -78,7 +79,7 @@ def challenge_types():
subclasses of Challenge, and Challenge itself.""" subclasses of Challenge, and Challenge itself."""
mapping = {} mapping = {}
for cls in all_subclasses(Challenge): for cls in all_subclasses(Challenge):
if cls == WithUserInfoChallenge: if cls in [WithUserInfoChallenge, LoginChallenge]:
continue continue
mapping[cls().fields["component"].default] = cls mapping[cls().fields["component"].default] = cls
return mapping return mapping

View File

@ -42978,7 +42978,6 @@ components:
- $ref: '#/components/schemas/FlowErrorChallenge' - $ref: '#/components/schemas/FlowErrorChallenge'
- $ref: '#/components/schemas/FrameChallenge' - $ref: '#/components/schemas/FrameChallenge'
- $ref: '#/components/schemas/IdentificationChallenge' - $ref: '#/components/schemas/IdentificationChallenge'
- $ref: '#/components/schemas/LoginChallenge'
- $ref: '#/components/schemas/OAuthDeviceCodeChallenge' - $ref: '#/components/schemas/OAuthDeviceCodeChallenge'
- $ref: '#/components/schemas/OAuthDeviceCodeFinishChallenge' - $ref: '#/components/schemas/OAuthDeviceCodeFinishChallenge'
- $ref: '#/components/schemas/PasswordChallenge' - $ref: '#/components/schemas/PasswordChallenge'
@ -43008,8 +43007,6 @@ components:
ak-stage-flow-error: '#/components/schemas/FlowErrorChallenge' ak-stage-flow-error: '#/components/schemas/FlowErrorChallenge'
xak-flow-frame: '#/components/schemas/FrameChallenge' xak-flow-frame: '#/components/schemas/FrameChallenge'
ak-stage-identification: '#/components/schemas/IdentificationChallenge' ak-stage-identification: '#/components/schemas/IdentificationChallenge'
? ''
: '#/components/schemas/LoginChallenge'
ak-provider-oauth2-device-code: '#/components/schemas/OAuthDeviceCodeChallenge' ak-provider-oauth2-device-code: '#/components/schemas/OAuthDeviceCodeChallenge'
ak-provider-oauth2-device-code-finish: '#/components/schemas/OAuthDeviceCodeFinishChallenge' ak-provider-oauth2-device-code-finish: '#/components/schemas/OAuthDeviceCodeFinishChallenge'
ak-stage-password: '#/components/schemas/PasswordChallenge' ak-stage-password: '#/components/schemas/PasswordChallenge'
@ -47931,21 +47928,6 @@ components:
- debug - debug
- notset - notset
type: string 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: LoginChallengeTypes:
oneOf: oneOf:
- $ref: '#/components/schemas/RedirectChallenge' - $ref: '#/components/schemas/RedirectChallenge'