From 2c3a7170164d878391c429e617d0301ee3ff4ac3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 4 Sep 2007 15:02:03 +0000 Subject: [PATCH] Monotone-Parent: 731b884e08c6de775b61ebcbaaa80856806dd4f0 Monotone-Revision: afb936940418b75e98e7e6cf8708708932b6179f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-04T15:02:03 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ UI/MainUI/SOGoUserHomePage.m | 29 +++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4510ef44..571acc491 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-04 Wolfgang Sourdeau + + * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]): + new method that resets the authentification cookie. + 2007-08-29 Wolfgang Sourdeau * SoObjects/SOGo/LDAPSource.m ([LDAPSource diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index 410753ec8..7859b90d6 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -26,14 +26,16 @@ #import #import #import +#import #import #import #import #import #import -#import -#import +#import +#import +#import #import static NSString *defaultModule = nil; @@ -198,4 +200,27 @@ static NSString *defaultModule = nil; return response; } +- (id ) logoffAction +{ + WOResponse *response; + NSEnumerator *cookies; + WOCookie *cookie; + SOGoAuthenticator *auth; + id container; + + container = [[self clientObject] container]; + + response = [context response]; + [response setStatus: 302]; + [response setHeader: [container baseURLInContext: context] + forKey: @"location"]; + cookies = [[response cookies] objectEnumerator]; + auth = [[self clientObject] authenticatorInContext: context]; + cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context] + value: @"logoff"]; + [response addCookie: cookie]; + + return response; +} + @end