Merge branch 'main' into fix/gro-453-random-salt-crypto
This commit is contained in:
@@ -19,6 +19,12 @@ const putAuthProviderSchema = z.object({
|
|||||||
scopes: z.string().default("openid profile email"),
|
scopes: z.string().default("openid profile email"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/** Minimal schema for the test endpoint — only issuer/internal URLs are needed for OIDC discovery. */
|
||||||
|
const authProviderTestSchema = z.object({
|
||||||
|
issuerUrl: z.string().url(),
|
||||||
|
internalBaseUrl: z.string().url().nullable().optional(),
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /api/admin/auth-provider
|
* GET /api/admin/auth-provider
|
||||||
* Returns the current provider config with clientSecret redacted.
|
* Returns the current provider config with clientSecret redacted.
|
||||||
@@ -131,7 +137,7 @@ let encryptedSecret: string;
|
|||||||
authProviderRouter.post(
|
authProviderRouter.post(
|
||||||
"/test",
|
"/test",
|
||||||
requireSuperUser(),
|
requireSuperUser(),
|
||||||
zValidator("json", putAuthProviderSchema.omit({ clientSecret: true })),
|
zValidator("json", authProviderTestSchema),
|
||||||
async (c) => {
|
async (c) => {
|
||||||
const body = c.req.valid("json");
|
const body = c.req.valid("json");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user