Configure an OAuth 2.0 authentication

In this topic, you learn how to set up an authentication via OAuth 2.0 and how to configure it in your Cockpit.

Prerequisites

  • There are no prerequisites.

Procedure

  1. In the Cockpit, go to Settings, and select System Settings.

  2. In the Authentication tab, select Edit.

  3. Select Add, and select OAuth2.

    Result: The Authentication dialog opens.

  4. In OAuth2, fill in or select the following fields:

    1. Enter a Name for the authentication.

    2. Select Active to activate this authentication method.

    3. Select Show on login page to display the authentication method on the login page.

    4. Enter a Description.

    5. Enter a Path to post login data.

      Depending on what authentication method you want to use, fill in the following fields accordingly:

      Authorisation URL
      Token URL
      Callback URL
      Redirect URL
      Client ID
      Client Secret

      Optionally, to send a reminder email to renew your client secret for OAuth 2.0, turn on the switch Send Reminder Email before Expiry.

      If you turn on the switch, in Expiry Date, select the expiry date of the client secret. In Days before Expiry, select the number of days in 24 hours until midnight that the email reminder should be sent before expiry of the client secret. In Send to Email Address, enter an email address of your choosing or one that corresponds to the email address you configure for the SMTP host in the Emailing tab.

      Scope
      ProfileScript
  5. In Claims Assignment, select Add to add claims assignments.

  6. In Auto Assignment, assign roles and the departments.

  7. In Custom Script, you can enter your code (optional) to tweak the roles' assignment manually.

  8. Select OK to confirm.

  9. In System Settings, select Restart to activate OAuth 2.0 authentication.

Results

  • You have configured and activated an OAuth 2.0 authentication.