Skip to content

Commit 8f619d1

Browse files
committed
Fully functional HTML Message Node. Initial code checkin.
1 parent dcf834e commit 8f619d1

12 files changed

Lines changed: 755 additions & 2 deletions

File tree

README.md

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1-
# HTMLMessageNode
2-
Display an HTML-formatted message in an authentication tree.
1+
# HTML Message Node
2+
Display an HTML-formatted message in an authentication tree and/or change the default button text.
3+
4+
An authentication node for ForgeRock's [Identity Platform][forgerock_platform] 6.5.2 and above. This node allows you to display a dynamic HTML-formatted message in a configurable location during an authentication or registration flow and optionally change the default *Log In* button's text.
5+
6+
7+
Download a release build fom the *release* tab or clone this repository to build your own release. Copy the .jar file from your download location or the *./target* directory (if you built it yourself) into the *../web-container/webapps/openam/WEB-INF/lib* directory where AM is deployed. Restart the web container to pick up the new node. The node will then appear in the authentication trees components palette.
8+
9+
10+
## Related Nodes
11+
- <a href="https://github.com/vscheuber/TermsAndConditionsNode">Terms And Conditions Node</a>
12+
- <a href="https://github.com/vscheuber/ProgressiveProfileCompletion">Progressive Profile Completion Node</a>
13+
14+
15+
## Usage
16+
Use this node to esily add custom links below the login button like: <p><a href="https://am.mytestrun.com/openam/?service=register">Register account</a> <span>·</span> <a href="https://am.mytestrun.com/user/#/forgotusername">Forgot username</a> <span>·</span> <a href="https://am.mytestrun.com/user/#/passwordreset">Forgot password</a></p> Or display personalized messages such as "Hello {{username}}" using shared state variable names, which will be substituted with their value at runtime.
17+
18+
A sample tree could look like this:
19+
20+
![ScreenShot of a sample tree](./example_tree.png)
21+
22+
Note: The user is first properly authenticated using username and password, only then does she reach the PPC node.
23+
24+
A few sample dialogs:
25+
26+
<img src="./example_dialog_footer.png" alt="Footer" width="300"/><img src="./example_dialog_message.png" alt="Footer" width="300"/><img src="./example_dialog_variable.png" alt="Footer" width="300"/>
27+
28+
## Settings
29+
Setting | Description
30+
------------------- | -----------
31+
Message | Enter the message to display. Use HTML tags for formatting. You can reference shared state variable anywhere in your message using the <code>{{variable}}</code> notation.
32+
Vertically Align | Select where you would like the message to appear vertically: Top inserts it before the first field, bottom inserts it at the very end (after the button), and neutral inserts it right where you position the node (top and neutral only differ inside a page node).
33+
Horizontally Align | Select the text alignment inside the box.
34+
Box | Select this option to have the message appear in a box.
35+
Overwrite Button | Enabled this option to change the text of the <code>LOG IN</code> button.
36+
Button Text | Specify localized texts for to overwrite the <code>LOG IN</code> button with.
37+
38+
## Building Authentication Nodes
39+
The code in this repository has binary dependencies that live in the ForgeRock maven repository. Maven can be configured to authenticate to this repository by following the following [ForgeRock Knowledge Base Article](https://backstage.forgerock.com/knowledge/kb/article/a74096897).
40+
41+
42+
The code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. ForgeRock does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in production configurations.
43+
44+
ForgeRock does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. ForgeRock disclaims all warranties, expressed or implied, and in particular, disclaims all warranties of merchantability, and warranties related to the code, or any service or software related thereto.
45+
46+
ForgeRock shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
47+
48+
[forgerock_platform]: https://www.forgerock.com/platform/

legal/CDDL-1.0.txt

Lines changed: 131 additions & 0 deletions
Large diffs are not rendered by default.

pom.xml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
* The contents of this file are subject to the terms of the Common Development and
4+
* Distribution License (the License). You may not use this file except in compliance with the
5+
* License.
6+
*
7+
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
8+
* specific language governing permission and limitations under the License.
9+
*
10+
* When distributing Covered Software, include this CDDL Header Notice in each file and include
11+
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
12+
* Header, with the fields enclosed by brackets [] replaced by your own identifying
13+
* information: "Portions copyright [year] [name of copyright owner]".
14+
*
15+
* Copyright 2017-2018 ForgeRock AS.
16+
*
17+
-->
18+
19+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
21+
<modelVersion>4.0.0</modelVersion>
22+
23+
<artifactId>HTMLMessageNode</artifactId>
24+
25+
<groupId>org.forgerock.am</groupId>
26+
<version>1.0.0</version>
27+
<name>Template for an Auth Tree Node maven project</name>
28+
<description>An Authentication Tree Node for ForgeRock's Identity Platform</description>
29+
30+
<properties>
31+
<am.version>6.5.2</am.version>
32+
<maven.compiler.source>1.8</maven.compiler.source>
33+
<maven.compiler.target>1.8</maven.compiler.target>
34+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
35+
</properties>
36+
37+
<dependencyManagement>
38+
<dependencies>
39+
<dependency>
40+
<groupId>org.forgerock.am</groupId>
41+
<artifactId>openam-auth-trees</artifactId>
42+
<type>pom</type>
43+
<scope>import</scope>
44+
<version>${am.version}</version>
45+
</dependency>
46+
</dependencies>
47+
</dependencyManagement>
48+
49+
<dependencies>
50+
<dependency>
51+
<groupId>org.forgerock.am</groupId>
52+
<artifactId>openam-push-notification</artifactId>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.forgerock.am</groupId>
56+
<artifactId>auth-node-api</artifactId>
57+
<scope>provided</scope>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.forgerock.am</groupId>
61+
<artifactId>openam-guice-core</artifactId>
62+
<scope>provided</scope>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.forgerock.am</groupId>
66+
<artifactId>openam-core</artifactId>
67+
<scope>provided</scope>
68+
</dependency>
69+
</dependencies>
70+
71+
<repositories>
72+
<repository>
73+
<snapshots>
74+
<enabled>false</enabled>
75+
</snapshots>
76+
<id>forgerock-private-releases</id>
77+
<name>ForgeRock Private Release Repository</name>
78+
<url>http://maven.forgerock.org/repo/private-releases</url>
79+
</repository>
80+
</repositories>
81+
82+
</project>

sample_dialog_footer.png

67.2 KB
Loading

sample_dialog_message.png

64 KB
Loading

sample_dialog_variable.png

54.6 KB
Loading

sample_tree.png

267 KB
Loading

0 commit comments

Comments
 (0)