Form App
The Form App is a standalone application designed to allow users to securely log in and enter data into various forms. It utilizes the Form Service APIs to retrieve the schemas and data necessary to render specific forms, save data as it is entered, and submit the forms for review upon completion. This means developers can quickly build and deploy forms without the need to create a new application from scratch.
The form data is stored in an ADSP database and can be accessed via an API call or through the Task App, another standalone application by ADSP. If your requirements include simply reviewing and assessing the information (e.g., determining if an applicant is successful, after which a clerk or another application takes over), then the Task App is ideal, requiring no additional coding. For more sophisticated processing of the information, developers can build their own applications to access the form data from ADSP and potentially distribute it to their own databases for further processing and reporting.
The URL for a specific form is derived from your ADSP tenant-name and the ID of the form. E.g. the URL below allows a user to log in and work with the Farmers Market License Application form in the AFIDS tenant:
https://form.adsp-uat.alberta.ca/afids/Farmers-Market-License-Application
Users
Forms can be configured to allow only those people with GoA or Alberta.ca credentials to access and fill them in. This gives users the best experience, as they will be able to fill in the information over several sessions, as needed. In addition, they will be able to initiate online conversations with form administrators if they have questions.
However, you can also configure a form to allow anonymous access. Anyone will be able to fill in and submit a form, without logging in. In this case, they will have to complete the form in one session, and they will not have access to the “chat” capability.
Security
Developers can define the roles that are required to create, review and disposition their forms, as described in the security section of the tutorial. In addition, they will need the ADSP-specific roles for accessing a form. The former should be specific to your Tenant and Form Definition, as they will lock down access so that only your users can log-in and fill in the information. For the Form App, a user will need to be an applicant. Clerks and assessors will be able to review and disposition this forms through the Task App.
Client Security
The Form App signs users in with the urn:ads:platform:form-app keycloak client in your tenant’s realm. New tenants don’t have this client, so check that it exists and add it if it doesn’t:
- In Keycloak, open Clients and click Create client. Use client type OpenID Connect and client ID urn:ads:platform:form-app.
- Turn Client authentication off, so it’s a public client. Turn Standard flow on and Direct access grants off.
- Set Valid redirect URIs and Valid post logout redirect URIs to the Form App host followed by
/*, e.g.https://form.adsp-uat.alberta.ca/*. Set Web origins to the host, e.g.https://form.adsp-uat.alberta.ca. - On the Advanced tab, set Proof Key for Code Exchange Code Challenge Method to S256.
The client’s access tokens must include these audiences. For each one, add an audience mapper in the client’s dedicated scope (urn:ads:platform:form-app-dedicated), with Add to access token on:
- urn:ads:platform:form-service
- urn:ads:platform:comment-service
- urn:ads:platform:push-service, for form updates and comments
- urn:ads:platform:form-gateway, to download the summary PDF
- urn:ads:platform:file-service, to upload files
If an audience is missing, requests to that service fail with a 401.
You can added an audience by clicking on the “Create” button and filling in the information as shown here:

File uploads
If a form has file upload fields, the Form App sends the files to the File Service with the user’s own access token. For uploads to work, every applicant needs:
- The urn:ads:platform:file-service audience in their access token. Add an audience mapper for it on the urn:ads:platform:form-app client, in the same way as the form service audience above.
- The form-file-uploader role of the urn:ads:platform:form-service client.
If either is missing, the upload fails with a 401.
To give every user the role when they sign in, instead of assigning it to each user, add form-file-uploader to your realm’s default roles. In Keycloak, open Realm settings, then the User registration tab, and assign the role under Default roles. If your forms use form-applicant as their applicant role, add it to the default roles too, so anyone who signs in can apply.
Don’t add form-file-reader to the default roles. It lets a user read every supporting document in the tenant. Applicants can read the files they uploaded without it.
User Experience
Ideally users will be able to access the link to the Form App directly from the alberta.ca website. Clicking on it will bring them to the form app where they will be asked to log in. If all their roles and permissions are correct they will see the form in question, e.g.

Summary PDF
You can give users of the Form App the capability of downloading a PDF summary of their completed application. In the Tenant Management Webapp, go to the form editor for the form in question. There you will see a “Lifecycle” tab and a checkbox for creating a PDF upon submission.

When checked you will see a PDF Preview tab in on the right-hand pane of the editor that shows what the generated PDF will look like. In the form app the user will see this after submission:

NOTE: The download capability is only available to forms that require login. It is not available to anonymous forms.
ADSP form-app client audience
To fetch summary PDF file, aud of the access token used in the form app must include urn:ads:platform:form-service and urn:ads:platform:form-gateway. Otherwise, the user will see 401 error message on the submission summary page.
Based on the business logic, there are different ways to add the two audiences into access token. The most widely used method is to add the two audiences on urn:ads:platform:form-app. The following are the details:
- Navigate to the client configuration of the urn:ads:platform:form-app client.
- Click the Client scopes and choose the urn:ads:platform:form-app-dedicated scope.

- Add the two audience mappers in the urn:ads:platform:form-app-dedicated scope. The configurations of the two audiences mappers are shown as follows.
