From cbf592830548ac260d05705cc34bcf8be0fa264b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 4 Sep 2007 15:41:14 +0000 Subject: [PATCH] Monotone-Parent: c80328c7641cc92221810e163f1f30bb47dbbd6e Monotone-Revision: 32f5ff4c695e7e7d495966f686556dc800e22466 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-04T15:41:14 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ Main/SOGo.m | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04969059a..012f73bf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-09-04 Wolfgang Sourdeau + * Main/SOGo.m ([SOGo -authenticatorInContext:_ctx]): choose the + authenticator based on the request handler key. "dav" returns the + SOGoDAVAuthenticator, anything else returns the Web authenticator. + + * SoObjects/SOGo/SOGoDAVAuthenticator.m: renamed module from + "SOGoAuthenticator". + * SoObjects/SOGo/SOGoWebAuthenticator.m: new class module implementing a subclass of SoCookieAuthenticator, designed for web-based cookie authentication of users.m diff --git a/Main/SOGo.m b/Main/SOGo.m index 702297498..52c2a0d76 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -41,10 +41,11 @@ #import -#import +#import +#import #import #import -#import +#import #import "build.h" #import "SOGoProductLoader.h" @@ -233,7 +234,16 @@ static BOOL debugObjectAllocation = NO; - (id) authenticatorInContext: (id) _ctx { - return [$(@"SOGoAuthenticator") sharedSOGoAuthenticator]; + id authenticator; + NSString *key; + + key = [[_ctx request] requestHandlerKey]; + if ([key isEqualToString: @"dav"]) + authenticator = [SOGoDAVAuthenticator sharedSOGoDAVAuthenticator]; + else + authenticator = [SOGoWebAuthenticator sharedSOGoWebAuthenticator]; + + return authenticator; } /* name lookup */