Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Marc 'risson' Schmitt
2025-02-27 17:08:46 +01:00
parent 1f7a2d5194
commit bad8a8ead5
3 changed files with 3 additions and 32 deletions

View File

@ -67,7 +67,7 @@ class Challenge(PassiveSerializer):
flow_info = ContextualFlowInfo(required=False) flow_info = ContextualFlowInfo(required=False)
component = CharField(default="") component = CharField(default="")
messages = MessageSerializer(many=True) messages = ListField(child=MessageSerializer(), allow_empty=True, required=False)
response_errors = DictField( response_errors = DictField(
child=ErrorDetailSerializer(many=True), allow_empty=True, required=False child=ErrorDetailSerializer(many=True), allow_empty=True, required=False
) )

View File

@ -39449,7 +39449,6 @@ components:
error_message: error_message:
type: string type: string
required: required:
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
AlgEnum: AlgEnum:
@ -39571,7 +39570,6 @@ components:
type: string type: string
required: required:
- client_id - client_id
- messages
- redirect_uri - redirect_uri
- scope - scope
- state - state
@ -39906,7 +39904,6 @@ components:
required: required:
- activation_barcode - activation_barcode
- activation_code - activation_code
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
- stage_uuid - stage_uuid
@ -40068,7 +40065,6 @@ components:
type: boolean type: boolean
default: true default: true
required: required:
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
AuthenticatorEmailChallengeResponseRequest: AuthenticatorEmailChallengeResponseRequest:
@ -40326,7 +40322,6 @@ components:
type: boolean type: boolean
default: true default: true
required: required:
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
AuthenticatorSMSChallengeResponseRequest: AuthenticatorSMSChallengeResponseRequest:
@ -40496,7 +40491,6 @@ components:
type: string type: string
required: required:
- codes - codes
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
AuthenticatorStaticChallengeResponseRequest: AuthenticatorStaticChallengeResponseRequest:
@ -40620,7 +40614,6 @@ components:
type: string type: string
required: required:
- config_url - config_url
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
AuthenticatorTOTPChallengeResponseRequest: AuthenticatorTOTPChallengeResponseRequest:
@ -40859,7 +40852,6 @@ components:
required: required:
- configuration_stages - configuration_stages
- device_challenges - device_challenges
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
AuthenticatorValidationChallengeResponseRequest: AuthenticatorValidationChallengeResponseRequest:
@ -40910,7 +40902,6 @@ components:
type: object type: object
additionalProperties: {} additionalProperties: {}
required: required:
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
- registration - registration
@ -41066,7 +41057,6 @@ components:
type: string type: string
required: required:
- attrs - attrs
- messages
- url - url
BackendsEnum: BackendsEnum:
enum: enum:
@ -41337,7 +41327,6 @@ components:
required: required:
- interactive - interactive
- js_url - js_url
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
- site_key - site_key
@ -41746,7 +41735,6 @@ components:
type: string type: string
required: required:
- additional_permissions - additional_permissions
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
- permissions - permissions
@ -42537,7 +42525,6 @@ components:
name: name:
type: string type: string
required: required:
- messages
- name - name
DummyChallengeResponseRequest: DummyChallengeResponseRequest:
type: object type: object
@ -42741,8 +42728,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/ErrorDetail' $ref: '#/components/schemas/ErrorDetail'
required:
- messages
EmailChallengeResponseRequest: EmailChallengeResponseRequest:
type: object type: object
description: |- description: |-
@ -43681,7 +43666,6 @@ components:
traceback: traceback:
type: string type: string
required: required:
- messages
- request_id - request_id
FlowImportResult: FlowImportResult:
type: object type: object
@ -44016,7 +44000,6 @@ components:
type: string type: string
required: required:
- loading_text - loading_text
- messages
- url - url
FrameChallengeResponseRequest: FrameChallengeResponseRequest:
type: object type: object
@ -44856,7 +44839,6 @@ components:
type: boolean type: boolean
required: required:
- flow_designation - flow_designation
- messages
- password_fields - password_fields
- primary_action - primary_action
- show_source_labels - show_source_labels
@ -47321,8 +47303,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/ErrorDetail' $ref: '#/components/schemas/ErrorDetail'
required:
- messages
OAuthDeviceCodeChallengeResponseRequest: OAuthDeviceCodeChallengeResponseRequest:
type: object type: object
description: Response that includes the user-entered device code description: Response that includes the user-entered device code
@ -47355,8 +47335,6 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/ErrorDetail' $ref: '#/components/schemas/ErrorDetail'
required:
- messages
OAuthDeviceCodeFinishChallengeResponseRequest: OAuthDeviceCodeFinishChallengeResponseRequest:
type: object type: object
description: Response that device has been authenticated and tab can be closed description: Response that device has been authenticated and tab can be closed
@ -49521,7 +49499,6 @@ components:
type: boolean type: boolean
default: false default: false
required: required:
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
PasswordChallengeResponseRequest: PasswordChallengeResponseRequest:
@ -53077,7 +53054,6 @@ components:
type: string type: string
required: required:
- client_id - client_id
- messages
- slug - slug
PlexAuthenticationChallengeResponseRequest: PlexAuthenticationChallengeResponseRequest:
type: object type: object
@ -53607,7 +53583,6 @@ components:
$ref: '#/components/schemas/StagePrompt' $ref: '#/components/schemas/StagePrompt'
required: required:
- fields - fields
- messages
PromptChallengeResponseRequest: PromptChallengeResponseRequest:
type: object type: object
description: |- description: |-
@ -54805,7 +54780,6 @@ components:
to: to:
type: string type: string
required: required:
- messages
- to - to
RedirectChallengeResponseRequest: RedirectChallengeResponseRequest:
type: object type: object
@ -56686,7 +56660,6 @@ components:
type: string type: string
required: required:
- brand_name - brand_name
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
SessionUser: SessionUser:
@ -56815,7 +56788,6 @@ components:
type: string type: string
required: required:
- body - body
- messages
SignatureAlgorithmEnum: SignatureAlgorithmEnum:
enum: enum:
- http://www.w3.org/2000/09/xmldsig#rsa-sha1 - http://www.w3.org/2000/09/xmldsig#rsa-sha1
@ -58102,7 +58074,6 @@ components:
pending_user_avatar: pending_user_avatar:
type: string type: string
required: required:
- messages
- pending_user - pending_user
- pending_user_avatar - pending_user_avatar
UserLoginChallengeResponseRequest: UserLoginChallengeResponseRequest:

View File

@ -274,8 +274,8 @@ export class FlowExecutor extends Interface implements StageHost {
} }
} }
showMessages(messages: Array<Message>) { showMessages(messages: Array<Message> | undefined) {
for (const message of messages) { for (const message of (messages ??= [])) {
showMessage({ showMessage({
level: message.level as MessageLevel, level: message.level as MessageLevel,
message: message.message, message: message.message,