Attribute/Role base restriction

This feature will allow or restrict the user to log in based on attributes received from the OAuth server/provider. Using this feature, you can also redirect the user to a specific Drupal site URL if the user is restricted from logging in using SSO.

Step to enable Attribute/Role base restriction:

  • Scroll down to the Attribute/Role Base Restriction section in the Attribute and Role Mapping tab.
  • Check the Enable Attribute/Role Base Restriction checkbox. It is a mandatory action.
  • Now, enter the attribute name in the Attribute Name text field that you want to restrict or allow.
  • After entering the attribute name, select Allow below attributes or Restrict below attributes according to requirement.
    • Allow below attributes: Enabling this option will allow the users with the above-mentioned attribute name, to perform SSO.
    • Restrict below attributes: Enabling this option will restrict the users with the above-mentioned attribute name, to perform SSO.
  • Enter the attribute value in the text box. You can enter the multiple attribute values by separating them by ;(Semicolon).
  • In the Redirect Restricted Users text box enter the URL on which you want to redirect restricted users. Users will be directed to the login page if you keep it empty.
  • Click on the Save Configuration button.

Drupal OAuth Client - Attribute/Role Base Restriction