mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-10-31 14:15:50 +00:00 
			
		
		
		
	refactor: simplify ldap heartbeat
This commit is contained in:
		| @@ -105,9 +105,9 @@ func (l *LDAP) heartbeat() error { | |||||||
|  |  | ||||||
| 	// Create a search request to find the user by username | 	// Create a search request to find the user by username | ||||||
| 	searchRequest := ldapgo.NewSearchRequest( | 	searchRequest := ldapgo.NewSearchRequest( | ||||||
| 		l.Config.BaseDN, | 		"", | ||||||
| 		ldapgo.ScopeWholeSubtree, ldapgo.NeverDerefAliases, 0, 0, false, | 		ldapgo.ScopeBaseObject, ldapgo.NeverDerefAliases, 0, 0, false, | ||||||
| 		"(uid=*)", | 		"(objectClass=*)", | ||||||
| 		[]string{}, | 		[]string{}, | ||||||
| 		nil, | 		nil, | ||||||
| 	) | 	) | ||||||
| @@ -117,7 +117,6 @@ func (l *LDAP) heartbeat() error { | |||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// No error means the connection is alive | 	// No error means the connection is alive | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Stavros
					Stavros