2007-05-09 21:06:15 +02:00
|
|
|
/* LDAPSource.h - this file is part of SOGo
|
|
|
|
*
|
2011-01-24 19:02:12 +01:00
|
|
|
* Copyright (C) 2007-2011 Inverse inc.
|
2007-05-09 21:06:15 +02:00
|
|
|
*
|
|
|
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-12-14 19:08:36 +01:00
|
|
|
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
2011-04-14 20:41:10 +02:00
|
|
|
* Francis Lachapelle <flachapelle@inverse.ca>
|
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
|
|
|
|
|
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
2009-09-25 16:42:33 +02:00
|
|
|
#include "SOGoSource.h"
|
2010-03-08 16:18:05 +01:00
|
|
|
#include "SOGoConstants.h"
|
2009-09-25 16:42:33 +02:00
|
|
|
|
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
|
|
|
|
2009-12-02 21:55:13 +01:00
|
|
|
@interface LDAPSource : NSObject <SOGoDNSource>
|
2007-05-09 21:06:15 +02:00
|
|
|
{
|
2009-11-29 05:19:32 +01:00
|
|
|
int queryLimit;
|
|
|
|
int queryTimeout;
|
|
|
|
|
2007-10-10 20:44:26 +02:00
|
|
|
NSString *sourceID;
|
2012-01-04 16:26:30 +01:00
|
|
|
NSString *displayName;
|
|
|
|
|
2011-07-05 22:10:45 +02:00
|
|
|
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;
|
2007-05-09 21:06:15 +02:00
|
|
|
NSString *hostname;
|
|
|
|
unsigned int port;
|
2009-04-02 22:51:46 +02:00
|
|
|
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
|
|
|
|
|
|
|
NSString *baseDN;
|
2011-12-30 21:39:07 +01:00
|
|
|
LDAPSourceSchema *schema;
|
2011-07-05 22:10:45 +02:00
|
|
|
NSString *IDField; // the first part of a user DN
|
2007-05-09 21:06:15 +02:00
|
|
|
NSString *CNField;
|
|
|
|
NSString *UIDField;
|
2011-01-24 19:02:12 +01:00
|
|
|
NSArray *mailFields, *searchFields;
|
2011-04-14 20:41:10 +02:00
|
|
|
NSString *IMAPHostField, *IMAPLoginField;
|
2010-01-08 18:48:45 +01:00
|
|
|
NSArray *bindFields;
|
2012-01-04 16:26:30 +01:00
|
|
|
|
|
|
|
BOOL listRequiresDot;
|
2007-05-09 21:06:15 +02:00
|
|
|
|
2009-11-29 05:19:32 +01:00
|
|
|
NSString *domain;
|
|
|
|
NSString *contactInfoAttribute;
|
|
|
|
|
2011-12-30 21:39:07 +01:00
|
|
|
NSDictionary *contactMapping;
|
|
|
|
NSArray *contactObjectClasses;
|
|
|
|
|
2007-11-26 21:41:59 +01:00
|
|
|
NSDictionary *modulesConstraints;
|
|
|
|
|
2007-05-09 21:06:15 +02:00
|
|
|
NSMutableArray *searchAttributes;
|
2010-12-14 19:08:36 +01:00
|
|
|
|
2010-03-08 16:18:05 +01:00
|
|
|
BOOL passwordPolicy;
|
2010-12-14 19:08:36 +01:00
|
|
|
|
|
|
|
NSMutableDictionary *_dnCache;
|
2011-04-25 12:31:08 +02:00
|
|
|
|
|
|
|
/* resources handling */
|
|
|
|
NSString *kindField;
|
|
|
|
NSString *multipleBookingsField;
|
2012-01-12 21:01:34 +01:00
|
|
|
|
|
|
|
NSString *MSExchangeHostname;
|
2012-01-12 22:01:06 +01:00
|
|
|
|
2012-01-04 16:26:30 +01:00
|
|
|
/* user addressbooks */
|
|
|
|
NSString *abOU;
|
|
|
|
|
2011-12-30 21:39:07 +01:00
|
|
|
/* ACL */
|
|
|
|
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
|
2009-05-12 21:56:39 +02:00
|
|
|
IMAPHostField: (NSString *) newIMAPHostField
|
2011-04-14 20:41:10 +02:00
|
|
|
IMAPLoginField: (NSString *) newIMAPLoginField
|
2011-04-25 12:31:08 +02:00
|
|
|
bindFields: (id) newBindFields
|
|
|
|
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 */
|
|
|
|
- (void) setContactMapping: (NSDictionary *) newMapping
|
|
|
|
andObjectClasses: (NSArray *) newObjectClasses;
|
|
|
|
|
2009-05-03 19:50:57 +02:00
|
|
|
- (NGLdapEntry *) lookupGroupEntryByUID: (NSString *) theUID;
|
|
|
|
- (NGLdapEntry *) lookupGroupEntryByEmail: (NSString *) theEmail;
|
|
|
|
- (NGLdapEntry *) lookupGroupEntryByAttribute: (NSString *) theAttribute
|
|
|
|
andValue: (NSString *) theValue;
|
2009-04-30 23:17:55 +02:00
|
|
|
|
2007-05-09 21:06:15 +02:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif /* LDAPSOURCE_H */
|