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