Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Svelte 5 Migration 16: migrate /admin/docs + /admin/config #718

Merged
merged 11 commits into from
Feb 10, 2025
Merged
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions frontend/src/api/types/enc_keys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface EncKeyMigrateRequest {
/// Validation: PATTERN_ALNUM
key_id: string,
}

export interface EncKeysResponse {
active: string,
keys: string[],
}
11 changes: 11 additions & 0 deletions frontend/src/api/types/login_times.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export interface Argon2ParamsResponse {
m_cost: number,
t_cost: number,
p_cost: number,
}

export interface LoginTimeResponse {
argon2_params: Argon2ParamsResponse,
login_time: number,
num_cpus: number,
}
20 changes: 20 additions & 0 deletions frontend/src/api/types/oidc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export type JwkKeyPairAlg = 'RS256' | 'RS384' | 'RS512' | 'EdDSA';
export type JwkKeyPairType = 'RSA' | 'OKP';

export interface JWKSPublicKeyCerts {
kty: JwkKeyPairType,
alg: JwkKeyPairAlg,
// Ed25519
crv?: string,
kid?: string,
// RSA
n?: string,
// RSA
e?: string,
// OCT
x?: string,
}

export interface JWKSCerts {
keys: JWKSPublicKeyCerts[],
}
20 changes: 20 additions & 0 deletions frontend/src/api/types/password_hashing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export interface PasswordHashTimesRequest {
/// Validation: min 500
target_time: number,
/// Validation: min 32768
m_cost?: number,
/// Validation: min 2
p_cost?: number,
}

export interface PasswordHashTime {
alg: string,
m_cost: number,
t_cost: number,
p_cost: number,
time_taken: number,
}

export interface PasswordHashTimes {
results: PasswordHashTime[],
}
19 changes: 19 additions & 0 deletions frontend/src/api/types/password_policy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
export interface PasswordPolicyRequest {
/// Validation: `8 <= length_min <= 128`
length_min: number,
/// Validation: `8 <= length_max <= 128`
length_max: number,
/// Validation: `1 <= include_lower_case <= 32`
include_lower_case?: number,
/// Validation: `1 <= include_upper_case <= 32`
include_upper_case?: number,
/// Validation: `1 <= include_digits <= 32`
include_digits?: number,
/// Validation: `1 <= include_special <= 32`
include_special?: number,
/// Validation: `1 <= valid_days <= 3650`
valid_days?: number,
/// Validation: `1 <= not_recently_used <= 10`
not_recently_used?: number,
}

export interface PasswordPolicyResponse {
length_min: number,
length_max: number,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/admin/AdminMain.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import Clients from "./clients/Clients.svelte";
import Sessions from "./sessions/Sessions.svelte";
import Attr from "./userAttr/Attr.svelte";
import Config from "./config/Config.svelte";
import Config from "$lib5/admin/config/Config.svelte";
import IconWrenchScrew from "$lib/icons/IconWrenchScrew.svelte";
import IconUser from "$lib/icons/IconUser.svelte";
import IconOffice from "$lib/icons/IconOffice.svelte";
Expand All @@ -21,7 +21,7 @@
import IconLogout from "$lib/icons/IconLogout.svelte";
import IconId from "$lib/icons/IconId.svelte";
import RauthyLogo from "$lib/icons/RauthyLogo.svelte";
import Documentation from "./documentation/Documentation.svelte";
import Documentation from "$lib5/admin/documentation/Documentation.svelte";
import IconBookOpen from "$lib/icons/IconBookOpen.svelte";
import {onMount} from "svelte";
import Events from "$lib5/admin/events/Events.svelte";
Expand Down
42 changes: 0 additions & 42 deletions frontend/src/components/admin/config/Config.svelte

This file was deleted.

194 changes: 0 additions & 194 deletions frontend/src/components/admin/config/argon2/Argon2Params.svelte

This file was deleted.

Loading