You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/web/service/sso.ts

17 lines
719 B
TypeScript

import { get } from './base'
export const getUserSAMLSSOUrl = (invite_token?: string) => {
const url = invite_token ? `/enterprise/sso/saml/login?invite_token=${invite_token}` : '/enterprise/sso/saml/login'
return get<{ url: string }>(url)
}
export const getUserOIDCSSOUrl = (invite_token?: string) => {
const url = invite_token ? `/enterprise/sso/oidc/login?invite_token=${invite_token}` : '/enterprise/sso/oidc/login'
return get<{ url: string; state: string }>(url)
}
export const getUserOAuth2SSOUrl = (invite_token?: string) => {
const url = invite_token ? `/enterprise/sso/oauth2/login?invite_token=${invite_token}` : '/enterprise/sso/oauth2/login'
return get<{ url: string; state: string }>(url)
}