Skip to main content

Registering an application

This page describes what your users see when they connect (register) an application that you built in the Application wizard. It helps you to understand how the wizard steps turn into screens, and to test the result as a user would.

The short story​

ScreenComes from the wizard stepWhat the user does
1. Credentials2. Credentials ConfigurationChecks the Application name (Canvas adds this field) and fills in the form.
(Approval page of the application)3. Authentication, type CallbackApproves access and returns to Canvas.
2. Context4. Context ConfigurationAnswers the extra questions. Shown only if you defined some.
Done6. AuthorizationNothing. Canvas runs the Authorization script.

Screen 1: credentials​

The page title is Add and the application name (Edit and the name, when the user changes a registered application). The application card is on the left.

PartWhat it shows
Application nameThe first field. Required. See Application name.
InstructionsThe Instructions (HTML) of the Credentials Configuration step.
FieldsOne input for each field of the form. Hidden fields are not shown. A required field shows "<name> is required" when it is touched and empty. When the user edits a registered application, text and password fields show ************ instead of the saved value.

Application name​

Every registered application has a name of its own, so that the user can tell connections apart, for example two accounts of the same application.

  • Canvas adds the field itself. It is not part of your Credentials Configuration form, so do not create a name field there.
  • When the user adds an application, the field is filled in with the Name from Basic Information, for example "Octopus Cloud". The user may change it.
  • When the user edits a registered application, the field shows its current name.
  • The field is required: the primary button stays disabled while it is empty.
  • The name is saved when the user presses the primary button. It is shown on the card of the application, can be searched in the list, and is used in the email that tells about a failed authentication.
  • It can be changed later with Rename in the menu (three dots) of the card.
  • Canvas does not check that the name is unique.

Buttons:

ButtonWhenWhat it does
CancelAlwaysGoes back to the list of the user's applications.
Save & AuthenticateThe application has no context questionsSigns in.
Save & Continue AuthenticationThe application has context questionsSigns in and then shows the context screen.

The primary button is disabled until the form is valid.

What happens when it is pressed​

Direct request. Canvas runs the Authentication script with the answers as config.

  • If the application has no context questions, Canvas then runs the Authorization script and checks the result. If this takes long, the user sees the dialog Registration Activity, "Checking of application authorization in progress. Do you want to continue checking or cancel?", with No and Yes. When it works the user sees "Registration: New application '<name>' was added successfully".
  • If the application has context questions, Canvas shows the context screen.

Callback. The browser is sent to the approval page of the application. After the approval the application sends the user back to Canvas, and Canvas runs the Authentication script with configOauth. The user then sees "Application OAuth Success" or, if something went wrong, "Application OAuth Failure".

If the script throws an error, the user sees it as Error during Authentication/Re-authentication: JS_AUTH error: <message>, and nothing is saved. Write clear messages in your scripts: this is what your users read.

Screen 2: context questions​

Shown only when you defined context questions. It appears after a successful sign-in. It shows the Instructions (HTML) of the Context Configuration step and one control for each question that is not hidden. The name of the question is the label, with a required mark unless the question is optional.

  • The questions are loaded one after another, in the order of the wizard. The script of a question can use the answers to the questions above it.
  • When the user changes an answer, it is saved and the questions below it are loaded again. The page is locked for a moment while this happens.
  • A question whose script fails shows "Invalid context setting".
  • A required question that is empty shows "<name> is required".
ButtonWhat it does
CancelGoes back to the list of the user's applications.
Back arrowReturns to the credentials screen.
Save & AuthenticateEnabled when all questions are loaded, valid and saved. Saves the answers, runs the Authorization script and finishes the registration.

On success the user sees "Registration: New application '<name>' was added successfully" and returns to the list.

The status of a registered application​

On the card of a registered application:

StatusMeaning
newThe application was just registered.
okThe sign-in works.
errorThe sign-in failed or failed during renewal, or the application has context questions that were not completed and authorized.

A renewal that fails is retried automatically, see Re-Authentication. The Test action on the card repeats the sign-in at once (a renewal) and then runs the Authorization script.

Tips for testing as a user​

  1. Commit the draft in Versions and give your organization access in Access.
  2. Register the application as a user would, with real credentials.
  3. If you have context questions, check that the choices load and that your Authorization script uses the answers.
  4. Press Test on the registered application to try the renewal.