mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(core): Add OIDC support for SSO (#15988)
Co-authored-by: Andreas Fitzek <andreas.fitzek@n8n.io>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { SamlPreferences, SamlToggleDto } from '@n8n/api-types';
|
||||
import type { OidcConfigDto, SamlPreferences, SamlToggleDto } from '@n8n/api-types';
|
||||
|
||||
import type { IRestApiContext } from '../types';
|
||||
import { makeRestApiRequest } from '../utils';
|
||||
@@ -39,3 +39,18 @@ export const toggleSamlConfig = async (
|
||||
export const testSamlConfig = async (context: IRestApiContext): Promise<string> => {
|
||||
return await makeRestApiRequest(context, 'GET', '/sso/saml/config/test');
|
||||
};
|
||||
|
||||
export const getOidcConfig = async (context: IRestApiContext): Promise<OidcConfigDto> => {
|
||||
return await makeRestApiRequest(context, 'GET', '/sso/oidc/config');
|
||||
};
|
||||
|
||||
export const saveOidcConfig = async (
|
||||
context: IRestApiContext,
|
||||
data: OidcConfigDto,
|
||||
): Promise<OidcConfigDto> => {
|
||||
return await makeRestApiRequest(context, 'POST', '/sso/oidc/config', data);
|
||||
};
|
||||
|
||||
export const initOidcLogin = async (context: IRestApiContext): Promise<string> => {
|
||||
return await makeRestApiRequest(context, 'GET', '/sso/oidc/login');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user