Using The Example

To actually make use of this example, you need to do the following:

  1. Write and compile the PasswordAgreement class. In order to compile the class you need engine-core-7.1.1-1.jar in your classpath.

  2. Create a .properties file like the one listed in Basic Password Authentication Example and save it somewhere in a configuration layer. Lets say you save it as /agreements/PasswordAgreement.properties in your common layer (that, is /etc/escenic/engine/common/agreements/PasswordAgreement.properties in a standard installation).

  3. Edit /neo/io/managers/AgreementManager.properties in the same configuration layer and add the line:

    agreementPartner.test=/agreements/PasswordAgreement
  4. In Web Studio, select the publication sections you want to be password-protected and set:

    • Is agreement required to Yes.

    • Agreement information to test.

It should now not be possible to access these sections without entering one of the username/password combinations specified in /agreements/PasswordAgreement.properties.

This example is provided purely to illustrate how the Content Store's agreement system works. The PasswordAgreement class is deliberately simplified and not considered suitable for production use.