Downloading and Starting the Sample Application

ForgeRock provides a mockup web application for testing IG configurations. The sample application is used in the examples in this guide and the Gateway Guide.

Downloading and Starting the Sample Application

Download and Start the Sample Application
  1. Download IG-sample-application-7.0.2.jar, from the ForgeRock BackStage download site.

  2. Start the sample application:

    $ java -jar IG-sample-application-7.0.2.jar
    Preparing to listen for HTTP on port 8081.
    Preparing to listen for HTTPS on port 8444.
    ...
    INFO: [HttpServer] Started.
    Press Ctrl+C to stop the server.

    By default this server listens for HTTP on port 8081, and for HTTPS on port 8444. If one or both of those ports are not free, specify other ports:

    $ java -jar IG-sample-application-7.0.2.jar 8888 8889
  3. Check that the sample application is running in one of the following ways:

    • Go to http://localhost:8081/home to access the home page of the sample application. Information about the browser request is displayed.

    • Go to http://localhost:8081/login to access the login page of the sample application, and then log in with username demo and password Ch4ng31t. The username and some information about the browser request is displayed.

Stop the Sample Application
  • In the terminal where the sample application is running, select CTRL+C to stop the app.

Serving Static Resources for the Sample Application

When the sample application is used with IG in the examples in this guide and the Gateway Guide, the sample application must serve static resources, such as the .css. Add the following route to the IG configuration, as:

$HOME/.openig/config/routes/static-resources.json
%appdata%\OpenIG\config\routes\static-resources.json
{
  "name" : "sampleapp_resources",
  "baseURI" : "http://app.example.com:8081",
  "condition": "${matches(request.uri.path,'^/css')}",
  "handler": "ReverseProxyHandler"
}

Configuration Options for the Sample Application

To view the command-line options for the sample application, start it with the -h option:

$ java -jar IG-sample-application-7.0.2.jar -h
Usage: <main class> [options]
Options:
--http
The HTTP port number.
Default: 8081
--https
The HTTPS port number.
Default: 8444
--session
The session timeout in seconds.
Default: 60
--am-discovery-url
The AM URL base for OpenID Provider Configuration.
Default: http://openam.example.com:8088/openam/oauth2
-h, --help
Default: false
Read a different version of :