2007-05-09 21:06:15 +02:00
|
|
|
/* LDAPSource.h - this file is part of SOGo
|
|
|
|
*
|
2019-02-04 13:37:56 +01:00
|
|
|
* Copyright (C) 2007-2019 Inverse inc.
|
2007-05-09 21:06:15 +02:00
|
|
|
*
|
|
|
|
* This file is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This file is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; see the file COPYING. If not, write to
|
|
|
|
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LDAPSOURCE_H
|
|
|
|
#define LDAPSOURCE_H
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
#include "SOGoSource.h"
|
|
|
|
|
2011-12-30 21:39:07 +01:00
|
|
|
@class LDAPSourceSchema;
|
2009-04-30 23:17:55 +02:00
|
|
|
@class NGLdapEntry;
|
2012-01-04 16:26:30 +01:00
|
|
|
@class NSException;
|
|
|
|
@class NSMutableArray;
|
|
|
|
@class NSMutableDictionary;
|
|
|
|
@class NSString;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
2019-12-04 10:37:08 +01:00
|
|
|
@interface LDAPSource : NSObject <SOGoDNSource, SOGoMembershipSource>
|
2007-05-09 21:06:15 +02:00
|
|
|
{
|
2019-02-04 13:37:56 +01:00
|
|
|
int _queryLimit;
|
|
|
|
int _queryTimeout;
|
|
|
|
|
|
|
|
NSString *_sourceID;
|
|
|
|
NSString *_displayName;
|
|
|
|
|
|
|
|
NSString *_bindDN; // The bindDN/password could be either the source's one
|
|
|
|
NSString *_password; // or the current user if _bindAsCurrentUser is set to YES
|
|
|
|
NSString *_sourceBindDN; // while sourceBindDN/sourceBindPassword always belong to the source
|
|
|
|
NSString *_sourceBindPassword;
|
|
|
|
NSString *_hostname;
|
|
|
|
unsigned int _port;
|
|
|
|
NSString *_encryption;
|
2009-03-16 22:13:01 +01:00
|
|
|
NSString *_filter;
|
2012-01-04 16:26:30 +01:00
|
|
|
BOOL _bindAsCurrentUser;
|
2009-04-06 14:54:03 +02:00
|
|
|
NSString *_scope;
|
2012-01-26 17:22:28 +01:00
|
|
|
NSString *_userPasswordAlgorithm;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
NSString *_baseDN;
|
2019-02-19 19:40:58 +01:00
|
|
|
NSString *_pristineBaseDN;
|
2019-02-04 13:37:56 +01:00
|
|
|
LDAPSourceSchema *_schema;
|
|
|
|
NSString *_IDField; // the first part of a user DN
|
|
|
|
NSString *_CNField;
|
|
|
|
NSString *_UIDField;
|
|
|
|
NSArray *_mailFields;
|
|
|
|
NSArray *_searchFields;
|
|
|
|
NSString *_IMAPHostField;
|
|
|
|
NSString *_IMAPLoginField;
|
|
|
|
NSString *_SieveHostField;
|
|
|
|
NSArray *_bindFields;
|
2012-01-04 16:26:30 +01:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
BOOL _listRequiresDot;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
NSString *_domain;
|
|
|
|
NSString *_contactInfoAttribute;
|
2019-09-05 18:42:25 +02:00
|
|
|
BOOL _groupExpansionEnabled;
|
2009-11-29 05:19:32 +01:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
NSDictionary *_contactMapping;
|
|
|
|
NSArray *_contactObjectClasses;
|
|
|
|
NSArray *_groupObjectClasses;
|
2011-12-30 21:39:07 +01:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
NSDictionary *_modulesConstraints;
|
2020-06-09 17:52:07 +02:00
|
|
|
NSArray *_lookupFields;
|
2007-11-26 21:41:59 +01:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
BOOL _passwordPolicy;
|
|
|
|
BOOL _updateSambaNTLMPasswords;
|
2010-12-14 19:08:36 +01:00
|
|
|
|
2011-04-25 12:31:08 +02:00
|
|
|
/* resources handling */
|
2019-02-04 13:37:56 +01:00
|
|
|
NSString *_kindField;
|
|
|
|
NSString *_multipleBookingsField;
|
2012-01-12 21:01:34 +01:00
|
|
|
|
2019-02-04 13:37:56 +01:00
|
|
|
NSString *_MSExchangeHostname;
|
2012-01-12 22:01:06 +01:00
|
|
|
|
2012-01-04 16:26:30 +01:00
|
|
|
/* user addressbooks */
|
2019-02-04 13:37:56 +01:00
|
|
|
NSString *_abOU;
|
2012-01-04 16:26:30 +01:00
|
|
|
|
2011-12-30 21:39:07 +01:00
|
|
|
/* ACL */
|
2019-02-04 13:37:56 +01:00
|
|
|
NSArray *_modifiers;
|
2007-05-09 21:06:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setBindDN: (NSString *) newBindDN
|
2009-04-02 22:51:46 +02:00
|
|
|
password: (NSString *) newBindPassword
|
2007-05-09 21:06:15 +02:00
|
|
|
hostname: (NSString *) newBindHostname
|
|
|
|
port: (NSString *) newBindPort
|
2010-12-14 19:08:36 +01:00
|
|
|
encryption: (NSString *) newEncryption
|
|
|
|
bindAsCurrentUser: (NSString *) bindAsCurrentUser;
|
2009-04-30 23:17:55 +02:00
|
|
|
|
2007-05-09 21:06:15 +02:00
|
|
|
- (void) setBaseDN: (NSString *) newBaseDN
|
|
|
|
IDField: (NSString *) newIDField
|
|
|
|
CNField: (NSString *) newCNField
|
2007-05-10 23:18:13 +02:00
|
|
|
UIDField: (NSString *) newUIDField
|
2007-11-18 11:16:25 +01:00
|
|
|
mailFields: (NSArray *) newMailFields
|
2011-01-24 19:02:12 +01:00
|
|
|
searchFields: (NSArray *) newSearchFields
|
2015-03-24 13:40:13 +01:00
|
|
|
groupObjectClasses: (NSArray *) newGroupObjectClasses
|
2009-05-12 21:56:39 +02:00
|
|
|
IMAPHostField: (NSString *) newIMAPHostField
|
2011-04-14 20:41:10 +02:00
|
|
|
IMAPLoginField: (NSString *) newIMAPLoginField
|
2012-11-26 19:13:06 +01:00
|
|
|
SieveHostField: (NSString *) newSieveHostField
|
2011-04-25 12:31:08 +02:00
|
|
|
bindFields: (id) newBindFields
|
2020-06-09 17:52:07 +02:00
|
|
|
lookupFields: (NSArray *) newLookupFields
|
2011-04-25 12:31:08 +02:00
|
|
|
kindField: (NSString *) newKindField
|
|
|
|
andMultipleBookingsField: (NSString *) newMultipleBookingsField;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
2011-12-30 21:39:07 +01:00
|
|
|
/* This enable the convertion of a contact entry with inetOrgPerson and mozillaAbPerson
|
|
|
|
to and from an LDAP record */
|
2019-02-04 13:37:56 +01:00
|
|
|
- (void) setContactMapping: (NSDictionary *) theMapping
|
|
|
|
andObjectClasses: (NSArray *) theObjectClasses;
|
2011-12-30 21:39:07 +01:00
|
|
|
|
2015-12-30 15:22:08 +01:00
|
|
|
- (NGLdapEntry *) lookupGroupEntryByUID: (NSString *) theUID
|
2019-02-04 13:37:56 +01:00
|
|
|
inDomain: (NSString *) theDomain;
|
2015-12-30 15:22:08 +01:00
|
|
|
- (NGLdapEntry *) lookupGroupEntryByEmail: (NSString *) theEmail
|
2019-02-04 13:37:56 +01:00
|
|
|
inDomain: (NSString *) theDomain;
|
2009-04-30 23:17:55 +02:00
|
|
|
|
2016-03-18 17:37:21 +01:00
|
|
|
- (void) applyContactMappingToResult: (NSMutableDictionary *) ldifRecord;
|
|
|
|
|
2019-05-23 21:02:10 +02:00
|
|
|
- (void) updateBaseDNFromLogin: (NSString *) theLogin;
|
|
|
|
|
2019-09-05 18:42:25 +02:00
|
|
|
- (BOOL) groupExpansionEnabled;
|
|
|
|
|
2007-05-09 21:06:15 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* LDAPSOURCE_H */
|