sso.ts 719 B

12345678910111213141516
  1. import { get } from './base'
  2. export const getUserSAMLSSOUrl = (invite_token?: string) => {
  3. const url = invite_token ? `/enterprise/sso/saml/login?invite_token=${invite_token}` : '/enterprise/sso/saml/login'
  4. return get<{ url: string }>(url)
  5. }
  6. export const getUserOIDCSSOUrl = (invite_token?: string) => {
  7. const url = invite_token ? `/enterprise/sso/oidc/login?invite_token=${invite_token}` : '/enterprise/sso/oidc/login'
  8. return get<{ url: string; state: string }>(url)
  9. }
  10. export const getUserOAuth2SSOUrl = (invite_token?: string) => {
  11. const url = invite_token ? `/enterprise/sso/oauth2/login?invite_token=${invite_token}` : '/enterprise/sso/oauth2/login'
  12. return get<{ url: string; state: string }>(url)
  13. }