Ping SDKs

Step 2. Configure connection properties

There are two projects in this tutorial that require configuration:

Client Angular app

The front-end client app, written in Angular, that handles the UI and authentication journeys.

Backend API server

A backend REST API server that uses a confidential OAuth 2.0 client to contact the authorization server. The API server handles storage and retrieval of your personal "Todo" items.

Configure the Angular client app

Copy the .env.example file in the sdk-sample-apps/javascript/angular-todo folder and save it with the name .env within this same directory.

Add your relevant values to this new file because it provides all the important configuration settings to your applications.

Example client .env file
AM_URL=https://openam-forgerock-sdks.forgeblocks.com/am
APP_URL=https://localhost:8443
API_URL=http://localhost:9443
DEBUGGER_OFF=true
JOURNEY_LOGIN=sdkUsernamePasswordJourney
JOURNEY_REGISTER=Registration
REALM_PATH=alpha
WEB_OAUTH_CLIENT=sdkPublicClient
PORT=9443
REST_OAUTH_CLIENT=sdkConfidentialClient
REST_OAUTH_SECRET=ch4ng3it!

Here are descriptions for some of the values:

  • DEBUGGER_OFF: set to true, to disable debug statements in the app.

    These statements are for learning the integration points at runtime in your browser.

    When you open the browser’s developer tools, the app pauses at each integration point. Code comments are placed above each one explaining their use.

  • JOURNEY_LOGIN: The simple login journey or tree you created earlier, for example sdkUsernamePasswordJourney.

  • JOURNEY_REGISTER: The registration journey or tree.

    You can use the default built-in Registration journey.

  • REALM_PATH: The realm of your server.

    Usually, root for AM and alpha or beta for Advanced Identity Cloud.

Configure the API server app

Copy the .env.example file in the sdk-sample-apps/javascript/todo-api folder and save it with the name .env within this same directory.

Add your relevant values to this new file as it will provide all the important configuration settings to your applications.

Example API server .env file
AM_URL=https://openam-forgerock-sdks.forgeblocks.com/am
DEVELOPMENT=true
PORT=9443
REALM_PATH=alpha
REST_OAUTH_CLIENT=sdkConfidentialClient
REST_OAUTH_SECRET=ch4ng3it!