From d1d9024eca8cc0de2674815788f87342463df5ee Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Wed, 19 Mar 2025 14:05:49 +0100 Subject: [PATCH] fix(auth): add missing method to auth class --- SoObjects/SOGo/SOGoAuthenticator.h | 3 +++ SoObjects/SOGo/SOGoDAVAuthenticator.m | 6 ++++++ SoObjects/SOGo/SOGoProxyAuthenticator.m | 6 ++++++ SoObjects/SOGo/SOGoStaticAuthenticator.m | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/SoObjects/SOGo/SOGoAuthenticator.h b/SoObjects/SOGo/SOGoAuthenticator.h index 909edda0e..09cc5737d 100644 --- a/SoObjects/SOGo/SOGoAuthenticator.h +++ b/SoObjects/SOGo/SOGoAuthenticator.h @@ -32,6 +32,9 @@ - (NSString *) passwordInContext: (WOContext *) context; - (SOGoUser *) userInContext: (WOContext *) context; +/* To set additionnal cookies (override in subclasses !)*/ +- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx; + - (NSString *) imapPasswordInContext: (WOContext *) context forURL: (NSURL *) server forceRenew: (BOOL) renew; diff --git a/SoObjects/SOGo/SOGoDAVAuthenticator.m b/SoObjects/SOGo/SOGoDAVAuthenticator.m index 403ffa63e..65f43107d 100644 --- a/SoObjects/SOGo/SOGoDAVAuthenticator.m +++ b/SoObjects/SOGo/SOGoDAVAuthenticator.m @@ -86,6 +86,12 @@ return rc; } +- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx +{ + //Needs to be override by children if needed + return nil; +} + - (NSString *) passwordInContext: (WOContext *) context { NSString *auth, *password; diff --git a/SoObjects/SOGo/SOGoProxyAuthenticator.m b/SoObjects/SOGo/SOGoProxyAuthenticator.m index 212398a86..5afb6d698 100644 --- a/SoObjects/SOGo/SOGoProxyAuthenticator.m +++ b/SoObjects/SOGo/SOGoProxyAuthenticator.m @@ -103,6 +103,12 @@ return user; } +- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx +{ + //Needs to be override by children if needed + return nil; +} + #warning the DAV authenticator is pretty similar to this one. We should enable \ the use of the former for Basic auth type through some defaults. - (NSString *) passwordInContext: (WOContext *) context diff --git a/SoObjects/SOGo/SOGoStaticAuthenticator.m b/SoObjects/SOGo/SOGoStaticAuthenticator.m index af8daf0a2..62bc1ddf4 100644 --- a/SoObjects/SOGo/SOGoStaticAuthenticator.m +++ b/SoObjects/SOGo/SOGoStaticAuthenticator.m @@ -72,6 +72,12 @@ return nil; } +- (NSArray *)getCookiesIfNeeded: (WOContext *)_ctx +{ + //Needs to be override by children if needed + return nil; +} + - (NSString *) username { return _username;