-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6744 from brionmario/code-cleanup-2024-extensions
[🧹 UNIFICATION CLEANUP] Refactor `admin.extensions.v1/components/application`
- Loading branch information
Showing
39 changed files
with
490 additions
and
6,569 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@wso2is/admin.applications.v1": patch | ||
"@wso2is/admin.extensions.v1": patch | ||
"@wso2is/admin.roles.v2": patch | ||
"@wso2is/theme": patch | ||
--- | ||
|
||
Refactor `admin.extensions.v1/components/application` |
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
38 changes: 38 additions & 0 deletions
38
features/admin.applications.v1/utils/get-try-it-client-id.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,38 @@ | ||
/** | ||
* Copyright (c) 2022-2024, WSO2 LLC. (https://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import LoginApplicationTemplate from "../data/try-it-application.json"; | ||
|
||
/** | ||
* Retrieves the Try It client ID for a given tenant domain. | ||
* | ||
* @param tenantDomain - The tenant domain to replace in the client ID template. | ||
* @returns The client ID with the tenant domain replaced. | ||
* | ||
* @example | ||
* // Assuming the client ID template is "client_<TENANT>_id" | ||
* // and tenantDomain is "example.com" | ||
* // returns "client_example.com_id" | ||
* const clientId = getTryItClientId("example.com"); | ||
*/ | ||
const getTryItClientId = (tenantDomain:string): string => { | ||
return LoginApplicationTemplate.application. | ||
inboundProtocolConfiguration.oidc.clientId.replace("<TENANT>", tenantDomain); | ||
}; | ||
|
||
export default getTryItClientId; |
Oops, something went wrong.