# Asgardeo App Extensions

|  Branch |Build Status | GitHub CI Status |
| :------------ |:------------- |:-------------
| master      | [![Build Status](https://wso2.org/jenkins/buildStatus/icon?job=iam-cloud%2Fiam-cloud-app-extensions)](https://wso2.org/jenkins/job/iam-cloud/job/iam-cloud-app-extensions/) | ![PR Builder](https://github.com/wso2-enterprise/asgardeo-app-extensions/workflows/PR%20Builder/badge.svg)|

Contains extensions which are applied on top of the parent [Identity Apps](https://github.com/wso2/identity-apps) respository to be used with [Asgardeo](https://github.com/wso2-enterprise/asgardeo-product).

## Prerequisites

Download or clone the project source code from [Asgardeo App Extensions
](https://github.com/wso2-enterprise/asgardeo-app-extensions)

## Adding a new extension
- Step 1
Add a new self explanatory named folder to the following path.
`app-extensions/developer-portal/src/extensions/components`

- Step 2
Add a new entry to the `config.js` located inside the `extensions` folder.


    module.exports = () => {
        return {
            sections: {
                components: {
                    "feedback-button": "./components/feedback/feedback.tsx"
    				// New entry of the extension with the path to the extension
                }
            }
        };

- Step 3 
Add necessary extension logic inside the above created extension folder.

##  Build

Run `mvn clean install` from the command line in the project root directory (where the root pom.xml is located).

## Build Archive

The final bundled archive will be located under the following location.

`distrubutions/developer-portal/target/identity-developer-portal-v1.**-SNAPSHOT.war`

## Run

To run the updated arcive you follow the below steps.

1. Build the [Identity Server](https://github.com/wso2/product-is.git "Identity Server ")
2. Replace the content of the `developer-portal` folder with the contents of the custom build archive of above to the following location.
`/repository/deployment/server/webapps/developer-portal`
3. Run the Identity server using `./wso2server.sh`
4. Navigate to `https://localhost:9443/developer-portal/` and login to the portal using default credentials.  

## Deployment

Please configure the following configuration overrides in the `deployment.toml` file.

1. Configurations for the console.
```toml
[console]
product_version.configs.versionOverride = "BETA"                                 # Product version appearing in the app header.
theme = "asgardio"                                                               # Customized sub theme name.
ui.app_copyright = "Asgardeo by WSO2"                                            # Copyright for the footer.
ui.app_title = "Asgardeo Console"                                                # App title (Visble on the browser tab)
ui.app_name = "Console"                                                          # Name of the app appearing on the logo.
ui.product_name = "Asgardeo"                                                     # Name of the product.
route_paths.home = "/develop/getting-started"                                    # Default home path for the app. (User's will be redirected here upon successful login)
applications.developer_app.configs.path = "/develop/getting-started"             # Default page for the develop view.
applications.admin_app.configs.path = "/manage/getting-started"                  # Default page for the manage view.
general_configurations.enabled = false                                           # Hides governance connectors.
session.params.userIdleTimeOut = 90000                                           # When to timeout IDLE user sessions.
session.params.userIdleWarningTimeOut = 89980                                    # When to warn users of IDLE user session timeouts.
session.params.sessionRefreshTimeOut = 1800                                      # Session reset timeout.
session.params.checkSessionInterval = 5                                          # How frequent the check session should occur.
```

2. Configurations for the My Account.

```toml
[myaccount]
product_version.configs.versionOverride = "BETA"                                 # Product version appearing in the app header.
theme = "asgardio"                                                               # Customized sub theme name.
ui.app_copyright = "Asgardeo by WSO2"                                            # Copyright for the footer.
ui.app_title = "Asgardeo Account"                                                # App title (Visble on the browser tab)
ui.app_name = "Account"                                                          # Name of the app appearing on the logo.
ui.product_name = "Asgardeo"                                                     # Name of the product.
session.params.userIdleTimeOut = 90000                                           # When to timeout IDLE user sessions.
session.params.userIdleWarningTimeOut = 89980                                    # When to warn users of IDLE user session timeouts.
session.params.sessionRefreshTimeOut = 1800                                      # Session reset timeout.
session.params.checkSessionInterval = 5                                          # How frequent the check session should occur.
```
