PingAM

Customize nodes

Customizing nodes is simpler than customizing authentication modules. You have two options, depending on your use case:

  • Use AM’s Node Designer to create your own scripted node types to reuse common functionality in journeys.

  • Build your own custom Java nodes.

    Node development requires fewer files, has fewer methods to implement, and has a simpler deployment process compared to module development.

Files used in module and node development

The following table shows how files from a typical module development project map to their equivalents in a node development project:

Module files Node equivalent Details

pom.xml

pom.xml

The Maven project file structure is similar for both.

  • amAuthSampleAuth.xml

  • SampleAuth.java

  • SampleAuthPrincipal.java

  • SampleAuth.xml

authNodeName.java

The logic from multiple module files is consolidated into the single core Java class.

amAuthSampleAuth.properties

authNodeName.properties

The properties file for UI strings has a direct equivalent.

SampleAuthPlugin.java

authNodeNamePlugin.java

The plugin registration class has a direct equivalent.

Learn more about the node development files in Files contained in the Maven project

Methods used in module and node development

The following table shows the method mapping between the SampleAuth module example and custom nodes:

Module methods Node equivalent Details

public void init(…​)

public interface Config {}

The init method, which handled module configuration via a Map of options, is replaced by a strongly-typed Config interface. This provides better type safety and makes configuration clearer.

  • public int process(…​)

  • public Principal getPrincipal()

  • setErrorText(…​), substituteUIStrings(…​)

  • Methods from the Principal class

public Action process(TreeContext context) {}

The complex state management, callback handling, and principal creation logic spread across multiple methods in the module are consolidated into a single process method. This method returns an Action object that encapsulates the outcome and any necessary state changes, simplifying the flow.

Learn more about the node development methods in Config interface and Action class.