-
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core,schemas,console): optimize the sso connector endpoints …
…naming (#5047) * refactor(core,schemas): rename the sso-connector-factory terms to connector-provider shouls align the terms of api. Replace the factory using provider. * refactor(core,console): rename the sso-connector-providers response property name rename the sso-connector-providers response property name * chore(core): update api doc content update api doc content * feat(core): declare the SAMLResponse field in ACS api body declare the SAMLResponse field in ACS api body * refactor(console,core): categorize standard SSO providers at client side only categorize standard SSO providers at client side only * fix(core): fix rebase issue fix rebase issue * chore(console): remove useless useMemo remove useless useMemo * chore(core): update the api content update the api content
- Loading branch information
Showing
12 changed files
with
80 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/console/src/pages/EnterpriseSso/SsoCreationModal/utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { type SsoConnectorProvidersResponse, SsoProviderName } from '@logto/schemas'; | ||
|
||
const standardSsoConnectorProviders = Object.freeze([SsoProviderName.OIDC, SsoProviderName.SAML]); | ||
|
||
export function categorizeSsoConnectorProviders(providers: SsoConnectorProvidersResponse = []): { | ||
standardProviders: SsoConnectorProvidersResponse; | ||
enterpriseProviders: SsoConnectorProvidersResponse; | ||
} { | ||
const standardProviders = new Set<SsoConnectorProvidersResponse[number]>(); | ||
const enterpriseProviders = new Set<SsoConnectorProvidersResponse[number]>(); | ||
|
||
for (const provider of providers) { | ||
if (standardSsoConnectorProviders.includes(provider.providerName)) { | ||
standardProviders.add(provider); | ||
} else { | ||
enterpriseProviders.add(provider); | ||
} | ||
} | ||
|
||
return { | ||
standardProviders: [...standardProviders], | ||
enterpriseProviders: [...enterpriseProviders], | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters