Skip to content

Commit

Permalink
Merge pull request #5113 from Malith-19/move-adaptive-script-warning-…
Browse files Browse the repository at this point in the history
…for-sensitive-data

Improve adaptive script docs
  • Loading branch information
ThaminduDilshan authored Feb 28, 2025
2 parents 7c1af17 + 2193d08 commit 3a1ece1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Configure conditional authentication

Given below are the high-level steps for enabling conditional authentication in your application.
Given below are the high-level steps for enabling conditional authentication in your applications.

!!! note
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version != "7.0.0") %}
- **ECMAScript Compliance**: Adaptive scripts currently comply with ECMAScript 2022 (ES13).
{% endif %}
- **Limitations**: Adaptive scripts do not support loops, `Log.warn` logs, or stringifying Java objects using
`JSON.stringify()`.

## Prerequisites

Expand All @@ -24,6 +31,14 @@ There are two ways to add a conditional authentication script:
- Use a [predefined template]({{base_path}}/guides/authentication/conditional-auth/#script-templates).
- Write a [new conditional auth script]({{base_path}}/guides/authentication/conditional-auth/write-your-first-script/).

{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version != "7.0.0") %}

!!! warning "Before you proceed"

When working with conditional authentication scripts, <b>never log secrets</b> or <b>sensitive information</b> within your authentication flows.

{% endif %}

## Add a secret to the script
Secrets securely store values associated with external APIs. These secret values are used in conditional authentication scripts when {{ product_name }} is required to interact with an external API (service endpoint) during the authentication process.

Expand All @@ -37,13 +52,7 @@ You can securely store these secret values on the {{ product_name }} Console and

{% endif %}

{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version != "7.0.0") %}

!!! warning "Before you proceed"

When working with conditional authentication scripts, <b>never log secrets</b> or sensitive information within your authentication flows.

{% endif %}

### Create a new secret

Expand All @@ -64,7 +73,7 @@ To add a new secret:
=== "Visual Editor"
Switch to the **Visual Editor** tab, expand the **Script Editor** and click **Add Secret**.

![Add secret to script using the visual editor]({{base_path}}//assets/img/guides/secret/add-secret-to-script-using-visual-editor.png){: width="600" style="display: block; margin: 0;"}
![Add secret to script using the visual editor]({{base_path}}/assets/img/guides/secret/add-secret-to-script-using-visual-editor.png){: width="600" style="display: block; margin: 0;"}

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

Follow this guide to write a conditional authentication script from scratch and to understand its internals.

!!! note
{% if product_name == "Asgardeo" or (product_name == "WSO2 Identity Server" and is_version != "7.0.0") %}
- **ECMAScript Compliance**: Adaptive scripts currently comply with ECMAScript 2022 (ES13).
{% endif %}
- **Limitations**: Adaptive scripts do not support loops, `Log.warn` logs, or stringifying Java objects using
`JSON.stringify()`.

## Scenario

Let's consider the following simplified set of requirements for your business application:
Expand Down

0 comments on commit 3a1ece1

Please sign in to comment.