Configure an OAuth 2 authentication

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

Prerequisites

  • There are no prerequisites.

Procedure

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

  2. Navigate to the Authentication tab and click Edit.

  3. Click Add, and select OAuth2.

    settings auth oauth2

    Result: The Authentication dialog opens.

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

    1. Enter a Name for the authentication.

    2. Check Active to activate this authentication method.

    3. Check 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
      Scope
      ProfileScript
  5. In Claims Assignment, click 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. Click OK to confirm.

  9. In System Settings, click Restart to activate OAuth 2 authentication.

Results

  • You have configured and activated an OAuth 2 authentication.