mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(editor): Migrate sso to @n8n/rest-api-client (no-changelog) (#16145)
This commit is contained in:
@@ -8,5 +8,6 @@ export * from './nodeTypes';
|
||||
export * from './npsSurvey';
|
||||
export * from './orchestration';
|
||||
export * from './roles';
|
||||
export * from './sso';
|
||||
export * from './ui';
|
||||
export * from './webhooks';
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import type { SamlPreferences, SamlToggleDto } from '@n8n/api-types';
|
||||
import { makeRestApiRequest } from '@n8n/rest-api-client';
|
||||
import type { SamlPreferencesExtractedData } from '@/Interface';
|
||||
import type { IRestApiContext } from '@n8n/rest-api-client';
|
||||
|
||||
import type { IRestApiContext } from '../types';
|
||||
import { makeRestApiRequest } from '../utils';
|
||||
|
||||
export type SamlPreferencesExtractedData = {
|
||||
entityID: string;
|
||||
returnUrl: string;
|
||||
};
|
||||
|
||||
export const initSSO = async (context: IRestApiContext, redirectUrl = ''): Promise<string> => {
|
||||
return await makeRestApiRequest(context, 'GET', `/sso/saml/initsso?redirect=${redirectUrl}`);
|
||||
@@ -1368,11 +1368,6 @@ export type ExecutionsQueryFilter = {
|
||||
vote?: ExecutionFilterVote;
|
||||
};
|
||||
|
||||
export type SamlPreferencesExtractedData = {
|
||||
entityID: string;
|
||||
returnUrl: string;
|
||||
};
|
||||
|
||||
export declare namespace Cloud {
|
||||
export interface PlanData {
|
||||
planId: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { SamlPreferences } from '@n8n/api-types';
|
||||
import type { Server, Request } from 'miragejs';
|
||||
import { Response } from 'miragejs';
|
||||
import type { SamlPreferencesExtractedData } from '@/Interface';
|
||||
import type { SamlPreferencesExtractedData } from '@n8n/rest-api-client/api/sso';
|
||||
import { faker } from '@faker-js/faker';
|
||||
import type { AppSchema } from '@/__tests__/server/types';
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
|
||||
@@ -5,8 +5,8 @@ import { defineStore } from 'pinia';
|
||||
import { EnterpriseEditionFeature } from '@/constants';
|
||||
import { useRootStore } from '@n8n/stores/useRootStore';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import * as ssoApi from '@/api/sso';
|
||||
import type { SamlPreferencesExtractedData } from '@/Interface';
|
||||
import * as ssoApi from '@n8n/rest-api-client/api/sso';
|
||||
import type { SamlPreferencesExtractedData } from '@n8n/rest-api-client/api/sso';
|
||||
import { updateCurrentUser } from '@/api/users';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { createComponentRenderer } from '@/__tests__/render';
|
||||
import { EnterpriseEditionFeature } from '@/constants';
|
||||
import { nextTick } from 'vue';
|
||||
import { usePageRedirectionHelper } from '@/composables/usePageRedirectionHelper';
|
||||
import type { SamlPreferencesExtractedData } from '@/Interface';
|
||||
import type { SamlPreferencesExtractedData } from '@n8n/rest-api-client/api/sso';
|
||||
|
||||
const renderView = createComponentRenderer(SettingsSso);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user