pGina.Plugin.Ldap.LdapServer.BindForSearch C# (CSharp) Метод

BindForSearch() публичный Метод

public BindForSearch ( ) : void
Результат void
        public void BindForSearch()
        {
            string searchDn = Settings.Store.SearchDN;
            string searchPw = Settings.Store.GetEncryptedSetting("SearchPW");

            if (string.IsNullOrEmpty(searchDn))
                // Bind anonymously
                this.Bind();
            else
                // Bind with credentials
                this.Bind(new NetworkCredential(searchDn, searchPw));
        }

Usage Example

Пример #1
0
        private void BindForAuthzOrGatewaySearch(LdapServer serv)
        {
            // If we're configured to use authorization credentials for searching, then
            // we don't need to bind to the server (it's already been done if auth was
            // successful).
            bool useAuthBindForSearch = Settings.Store.UseAuthBindForAuthzAndGateway;

            if (!useAuthBindForSearch)
            {
                serv.BindForSearch();
            }
            else
            {
                ////m_logger.DebugFormat("Using authentication credentials for LDAP search.");
            }
        }
All Usage Examples Of pGina.Plugin.Ldap.LdapServer::BindForSearch