1 import { IDP_TYPE } from '../interfaces';
3 export const getSAMLConfigs = () => ({
4 url: 'core/v4/saml/configs',
8 export const getSAMLStaticInfo = () => ({
9 url: 'core/v4/saml/sp/info',
13 export const getSAMLEdugainInfo = () => ({
14 url: 'core/v4/saml/edugain/info',
18 export const setupSAMLUrl = (data: { DomainID: string; MetadataURL: string }) => ({
19 url: 'core/v4/saml/setup/url',
24 export const setupSAMLXml = (data: { DomainID: string; XML: string }) => ({
25 url: 'core/v4/saml/setup/xml',
30 export const setupSAMLFields = (data: {
36 url: 'core/v4/saml/setup/fields',
40 Type: IDP_TYPE.DEFAULT,
44 export const setupEdugainSAML = (data: { DomainID: string; SSOEntityID: string; EdugainAffiliations: string[] }) => ({
45 url: 'core/v4/saml/setup/fields',
49 Type: IDP_TYPE.EDUGAIN,
52 * Dummy values. BE requires something to be set for these values. In the case of edugain, they are ignored.
53 * These should be removed when the BE no longer requires SSOURL and Certificate
55 SSOURL: 'https://dummy.proton.me',
61 export const updateSAMLConfig = (
70 url: `core/v4/saml/configs/${uid}/fields`,
75 export const removeSAMLConfig = (uid: string) => ({
76 url: `core/v4/saml/configs/${uid}/delete`,
80 export const getSCIMInfo = () => ({
81 url: 'core/v4/organizations/scim',
85 export const setupSCIM = (data: { Password: string }) => ({
86 url: 'core/v4/organizations/scim',
91 export const updateSCIM = (data: { State: 1; Password: string } | { State: 0 }) => ({
92 url: 'core/v4/organizations/scim',