# Auth Codes

todo

Config Key: auth_codes

<?php

// CLIENT_CONFIG/config/auth_codes.php

return [
    'auth_code' => [
        'name' => 'Auth Code Name',
        'enabled' => true,
        'roles' => [
            'CONTENT_MANAGER',
            'GATEKEEPER',
            'TERMINATOR',
        ],
        'scopes' => [
            'scope-one',
            'scope-two',
        ],
        'field_values' => [
            'opu' => 'germany',
        ],
        'allowedFilters' => [
            'name',
            'opu',
        ],
        'approvers' => [
            'boss@showcase-app.io',
        ],
        'approved_email_domains' => [
            'rmh-media.com',
        ]
    ],
];
auth_code

The key of the associative array returned by the config file is the auth code the user has to enter to sign up with SCP.

  • Required
  • Type: String
auth_code.name

Should be a human-friendly name as it can get viewed by the user on the Gui.

  • Required
  • Type: String
auth_code.enabled

If the auth code is disabled, users cannot use it anymore. If the user already has signed up and the auth code became inactive, he will be asked to enter a new one the next time he signs in.

  • Required
  • Type: Boolean
auth_code.roles

A set of roles the user will be assigned to by using the given auth code.

  • Required
  • Type: String[]
auth_code.scopes

A set of scopes which will be applied to the queries the user will make.

  • Optional
  • Default: []
  • Type: String[]
auth_code.field_values

Given field_values will be used during the material creation process to predefine the values of the request form.

  • Optional
  • Default: []
  • Type: [String => String]
auth_code.allowedFilters

If this option is unset all configured fields which have the filterable flag set will be available for material filtering in the Gui (see GUI Filters).

  • Optional
  • Type: [String => String]
auth_code.approvers

This array of e-mail-addresses will be merged with config.account_approval.default_approver config value to form the array of potential approvers for the new user.

  • Optional
  • Type: String[]
auth_code.approved_email_domains

This array of host names (without the @-sign) will be merged with config.account_approval.default_approved_domains config value to form the array of potential pre-approved domains for the auth code.

  • Optional
  • Type: String[]