forked from baron/baron-sso
fix(web): upgrade vite and restore devfront build
- switch adminfront and devfront to vite 8 - fix devfront TypeScript baseline build errors - require Node.js 24 LTS or newer in package metadata and docs Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
This commit is contained in:
@@ -13,7 +13,6 @@ export interface UserProfile {
|
||||
name: string;
|
||||
phone?: string;
|
||||
role: string;
|
||||
phone?: string;
|
||||
companyCode?: string;
|
||||
tenantId?: string;
|
||||
tenant?: Tenant;
|
||||
|
||||
@@ -10,6 +10,9 @@ export type ClientSummary = {
|
||||
status: ClientStatus;
|
||||
createdAt?: string;
|
||||
clientSecret?: string;
|
||||
tokenEndpointAuthMethod?: string;
|
||||
jwksUri?: string;
|
||||
jwks?: string | Record<string, unknown>;
|
||||
redirectUris: string[];
|
||||
scopes: string[];
|
||||
};
|
||||
@@ -71,6 +74,8 @@ export type ClientUpsertRequest = {
|
||||
grantTypes?: string[];
|
||||
responseTypes?: string[];
|
||||
tokenEndpointAuthMethod?: string;
|
||||
jwksUri?: string;
|
||||
jwks?: Record<string, unknown>;
|
||||
metadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
|
||||
@@ -18,18 +18,6 @@ function toBase64Url(base64: string): string {
|
||||
return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a hex string to a URL-safe Base64 string.
|
||||
*/
|
||||
function hexToBase64Url(hex: string): string {
|
||||
const binary = hex
|
||||
.match(/.{1,2}/g)
|
||||
?.map((byte) => String.fromCharCode(Number.parseInt(byte, 16)))
|
||||
.join("");
|
||||
if (!binary) return "";
|
||||
return toBase64Url(btoa(binary));
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts RSA Modulus (n) and Exponent (e) from a SubjectPublicKeyInfo (PEM).
|
||||
* This is a simplified parser for common RSA keys.
|
||||
@@ -37,7 +25,7 @@ function hexToBase64Url(hex: string): string {
|
||||
export function parsePemToJwk(pem: string): JWK | null {
|
||||
try {
|
||||
// Remove headers, footers and whitespace
|
||||
const base64 = pem
|
||||
pem
|
||||
.replace(/-----BEGIN PUBLIC KEY-----/, "")
|
||||
.replace(/-----END PUBLIC KEY-----/, "")
|
||||
.replace(/\s/g, "");
|
||||
@@ -84,8 +72,6 @@ export function parseSshRsaToJwk(sshKey: string): JWK | null {
|
||||
const eBlob = readBlob();
|
||||
const nBlob = readBlob();
|
||||
|
||||
const toB64Url = (blob: string) => toBase64Url(btoa(blob));
|
||||
|
||||
return {
|
||||
kty: "RSA",
|
||||
n: semanticsBase64Url(nBlob),
|
||||
|
||||
Reference in New Issue
Block a user