JWT auth plugin and necessary updates

This commit is contained in:
Gregory Schier
2025-01-17 08:02:55 -08:00
parent bd322162c8
commit 07ff709429
24 changed files with 327 additions and 104 deletions

View File

@@ -298,7 +298,8 @@ pub enum Icon {
#[ts(export, export_to = "events.ts")]
pub struct GetHttpAuthenticationResponse {
pub name: String,
pub plugin_name: String,
pub label: String,
pub short_label: String,
pub config: Vec<FormInput>,
}
@@ -356,6 +357,7 @@ pub struct TemplateFunction {
#[ts(export, export_to = "events.ts")]
pub enum FormInput {
Text(FormInputText),
Editor(FormInputEditor),
Select(FormInputSelect),
Checkbox(FormInputCheckbox),
File(FormInputFile),
@@ -391,6 +393,43 @@ pub struct FormInputText {
/// Placeholder for the text input
#[ts(optional = nullable)]
pub placeholder: Option<String>,
/// Placeholder for the text input
#[ts(optional)]
pub password: Option<bool>,
}
#[derive(Debug, Clone, Serialize, Deserialize, TS)]
#[serde(rename_all = "snake_case")]
#[ts(export, export_to = "events.ts")]
pub enum EditorLanguage {
Text,
Javascript,
Json,
Html,
Xml,
Graphql,
Markdown,
}
impl Default for EditorLanguage {
fn default() -> Self {
Self::Text
}
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]
#[serde(default, rename_all = "camelCase")]
#[ts(export, export_to = "events.ts")]
pub struct FormInputEditor {
#[serde(flatten)]
pub base: FormInputBase,
/// Placeholder for the text input
#[ts(optional = nullable)]
pub placeholder: Option<String>,
pub language: EditorLanguage,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize, TS)]