Attribute / Role Mapping


Attributes are the user details that are stored in your Identity Provider. These attributes include Username, Email, First Name, Last Name, Group/Role, Display Name, etc. The Attribute Mapping feature helps you to map these user attributes sent by the IDP to the Laravel user attributes.

 

To configure custom attribute mapping within your plugin settings, follow these steps:

  • Navigate to the Plugin Settings section.
  • Within Plugin Settings, locate the Service Provider Settings.
  • Look for the option named Custom Attribute Mapping.
  • In the left input field, specify the column name in your user laravel table where you want to map the attribute. This should correspond to the data you receive from the Identity Provider.
  • In the corresponding right input field, enter the attribute name from the data sent by the Identity Provider that you want to map to the specified column.

Laravel-saml-sso

 

For example, suppose you receive the following attributes from your Identity Provider:

{
"email": "person@example.com",
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"role": "admin"
}

If you want to map the "first_name" attribute from the Identity Provider to a column in your Laravel Application named "firstName," you would:

  1. Enter "firstName" in the left field (the column name in your application).
  2. Enter "first_name" in the right field (the attribute name from the Identity Provider).

This configuration ensures that the "first_name" attribute received from the Identity Provider is correctly mapped and stored in the "firstName" column in your Laravel Application.