Table of Contents

Class LdapConfig

Namespace
adas_core.LdapLogin.Configuration
Assembly
adas-core.LdapLogin.dll

Configuration class for LDAP authentication settings, including server details, user properties, and authority mappings.

public class LdapConfig
Inheritance
LdapConfig
Inherited Members
Extension Methods

Properties

AuthoritiesMap

A list of authority mappings that define how LDAP groups are mapped to application roles and permissions. Each mapping specifies a group name, the corresponding role in the application, the actions that the role is allowed to perform, and an optional display ID for user-friendly identification.

public List<AuthorityMap> AuthoritiesMap { get; set; }

Property Value

List<AuthorityMap>

DisplayNameProperty

The property name in the LDAP directory that corresponds to the user's display name. The default value is "displayName", which is commonly used in LDAP directories to represent the full name of the user.

public string? DisplayNameProperty { get; set; }

Property Value

string

Enabled

Indicates whether LDAP authentication is enabled. If set to true, the application will attempt to authenticate users against the configured LDAP server.

public bool Enabled { get; set; }

Property Value

bool

FirstNameProperty

The property name in the LDAP directory that corresponds to the user's first name and last name. The default values are "givenName" for the first name and "sn" (surname) for the last name, which are commonly used in LDAP directories to represent these attributes.

public string? FirstNameProperty { get; set; }

Property Value

string

GroupsProperty

The property name in the LDAP directory that corresponds to the user's group memberships. The default value is "memberOf", which is commonly used in Active Directory environments to indicate the groups a user belongs to.

public string? GroupsProperty { get; set; }

Property Value

string

LastNameProperty

The property name in the LDAP directory that corresponds to the user's last name. The default value is "sn" (surname), which is commonly used in LDAP directories to represent the last name of the user.

public string? LastNameProperty { get; set; }

Property Value

string

LdapPassword

The password associated with the LdapUser for binding to the LDAP server. This should be kept secure and not hard-coded in production environments. Consider using secure configuration management practices to handle sensitive information like this.

public string? LdapPassword { get; set; }

Property Value

string

LdapUser

The username and password used to bind to the LDAP server for performing searches and authentication. If your LDAP server requires authentication for these operations, you can specify the credentials here.

public string? LdapUser { get; set; }

Property Value

string

Port

The port number on which the LDAP server is listening. The default value is 389, which is the standard port for LDAP communication. If your LDAP server uses a different port, you can specify it here.

public int? Port { get; set; }

Property Value

int?

SearchBase

The base distinguished name (DN) for searching users in the LDAP directory. This is the starting point for LDAP queries to find user entries.

public string? SearchBase { get; set; }

Property Value

string

Server

The address of the LDAP server. This can be an IP address or a domain name. It is used to establish a connection to the LDAP server for authentication and user information retrieval.

public string? Server { get; set; }

Property Value

string

UserDomainName

The domain name of the LDAP server. This is typically used in conjunction with the username to form a fully qualified username (e.g., user@domain.com).

public string? UserDomainName { get; set; }

Property Value

string

UserNameProperty

The property name in the LDAP directory that corresponds to the username. The default value is "sAMAccountName", which is commonly used in Active Directory environments. This property is used to identify the user when performing authentication and retrieving user information from the LDAP server.

public string? UserNameProperty { get; set; }

Property Value

string

WhiteList

A list of users that are explicitly allowed to access the application, regardless of their LDAP group memberships. Each entry specifies the user's name, username, role, actions, and an optional display ID for user-friendly identification.

public List<UserLdap> WhiteList { get; set; }

Property Value

List<UserLdap>