misc: moved oidc endpoints to /sso

This commit is contained in:
Sheen Capadngan
2024-06-18 01:21:42 +08:00
parent d79ffbe37e
commit 4f2f7b2f70
3 changed files with 10 additions and 5 deletions

View File

@ -55,8 +55,13 @@ export const registerV1EERoutes = async (server: FastifyZodProvider) => {
{ prefix: "/dynamic-secrets" }
);
await server.register(registerSamlRouter, { prefix: "/sso" });
await server.register(registerOidcRouter, { prefix: "/oidc" });
await server.register(
async (ssoRouter) => {
await ssoRouter.register(registerSamlRouter);
await ssoRouter.register(registerOidcRouter, { prefix: "/oidc" });
},
{ prefix: "/sso" }
);
await server.register(registerScimRouter, { prefix: "/scim" });
await server.register(registerLdapRouter, { prefix: "/ldap" });
await server.register(registerSecretScanningRouter, { prefix: "/secret-scanning" });

View File

@ -28,7 +28,7 @@ export const useUpdateOIDCConfig = () => {
isActive?: boolean;
orgSlug: string;
}) => {
const { data } = await apiRequest.patch("/api/v1/oidc/config", {
const { data } = await apiRequest.patch("/api/v1/sso/oidc/config", {
issuer,
authorizationEndpoint,
jwksUri,
@ -72,7 +72,7 @@ export const useCreateOIDCConfig = () => {
isActive: boolean;
orgSlug: string;
}) => {
const { data } = await apiRequest.post("/api/v1/oidc/config", {
const { data } = await apiRequest.post("/api/v1/sso/oidc/config", {
issuer,
authorizationEndpoint,
jwksUri,

View File

@ -13,7 +13,7 @@ export const useGetOIDCConfig = (orgSlug: string) => {
queryKey: oidcConfigKeys.getOIDCConfig(orgSlug),
queryFn: async () => {
const { data } = await apiRequest.get<OIDCConfigData>(
`/api/v1/oidc/config?orgSlug=${orgSlug}`
`/api/v1/sso/oidc/config?orgSlug=${orgSlug}`
);
return data;