mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
ui networking getSSOSettingsCall
This commit is contained in:
parent
0af0de8a96
commit
0771d49ea7
1 changed files with 32 additions and 0 deletions
|
@ -3974,3 +3974,35 @@ export const uiSpendLogDetailsCall = async (
|
|||
}
|
||||
};
|
||||
|
||||
export const getSSOSettingsCall = async (accessToken: string) => {
|
||||
try {
|
||||
// Construct base URL
|
||||
let url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/sso_settings`
|
||||
: `/sso_settings`;
|
||||
|
||||
console.log("Fetching SSO settings from:", url);
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
[globalLitellmHeaderName]: `Bearer ${accessToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.text();
|
||||
handleError(errorData);
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
console.log("Fetched SSO settings:", data);
|
||||
return data;
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch SSO settings:", error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue