mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 10:35:17 +00:00
feature: finalized oidc core service methods
This commit is contained in:
@@ -2,6 +2,8 @@ import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { apiRequest } from "@app/config/request";
|
||||
|
||||
import { OIDCConfigData } from "./types";
|
||||
|
||||
export const oidcConfigKeys = {
|
||||
getOIDCConfig: (orgSlug: string) => [{ orgSlug }, "organization-oidc"] as const
|
||||
};
|
||||
@@ -10,7 +12,9 @@ export const useGetOIDCConfig = (orgSlug: string) => {
|
||||
return useQuery({
|
||||
queryKey: oidcConfigKeys.getOIDCConfig(orgSlug),
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.get(`/api/v1/oidc/config?orgSlug=${orgSlug}`);
|
||||
const { data } = await apiRequest.get<OIDCConfigData>(
|
||||
`/api/v1/oidc/config?orgSlug=${orgSlug}`
|
||||
);
|
||||
|
||||
return data;
|
||||
},
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export type OIDCConfigData = {
|
||||
id: string;
|
||||
issuer: string;
|
||||
authorizationEndpoint: string;
|
||||
jwksUri: string;
|
||||
tokenEndpoint: string;
|
||||
userinfoEndpoint: string;
|
||||
isActive: boolean;
|
||||
orgId: string;
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
};
|
||||
Reference in New Issue
Block a user