diff --git a/SoObjects/SOGo/SOGoDAVAuthenticator.m b/SoObjects/SOGo/SOGoDAVAuthenticator.m index 0755c223c..ad3bb7bce 100644 --- a/SoObjects/SOGo/SOGoDAVAuthenticator.m +++ b/SoObjects/SOGo/SOGoDAVAuthenticator.m @@ -51,7 +51,7 @@ } - (BOOL) checkLogin: (NSString *) _login - password: (NSString *) _pwd + password: (NSString *) _pwd { NSString *domain; SOGoSystemDefaults *sd; @@ -66,7 +66,7 @@ checkLogin: [_login stringByReplacingString: @"%40" withString: @"@"] password: _pwd - domain: &domain + domain: &domain perr: &perr expire: &expire grace: &grace] @@ -99,7 +99,7 @@ { creds = [self parseCredentials: auth]; if ([creds count] > 1) - password = [creds objectAtIndex: 1]; + password = [creds objectAtIndex: 1]; } return password; @@ -122,17 +122,19 @@ session = [SOGoCASSession CASSessionWithTicket: password fromProxy: YES]; - // We must NOT assume the scheme exists - scheme = [server scheme]; + // We must NOT assume the scheme exists + scheme = [server scheme]; - if (!scheme) - scheme = @"imap"; + if (!scheme) + scheme = @"imap"; - service = [NSString stringWithFormat: @"%@://%@", scheme, [server host]]; + service = [NSString stringWithFormat: @"%@://%@", scheme, [server host]]; if (renew) [session invalidateTicketForService: service]; + password = [session ticketForService: service]; + if ([password length] || renew) [session updateCache]; } diff --git a/SoObjects/SOGo/SOGoProxyAuthenticator.m b/SoObjects/SOGo/SOGoProxyAuthenticator.m index 08825fe98..7b1e96bb2 100644 --- a/SoObjects/SOGo/SOGoProxyAuthenticator.m +++ b/SoObjects/SOGo/SOGoProxyAuthenticator.m @@ -49,7 +49,7 @@ } - (BOOL) checkLogin: (NSString *) _login - password: (NSString *) _pwd + password: (NSString *) _pwd { return YES; } diff --git a/SoObjects/SOGo/SOGoWebAuthenticator.m b/SoObjects/SOGo/SOGoWebAuthenticator.m index 639ca4ec0..5da053328 100644 --- a/SoObjects/SOGo/SOGoWebAuthenticator.m +++ b/SoObjects/SOGo/SOGoWebAuthenticator.m @@ -74,7 +74,7 @@ } - (BOOL) checkLogin: (NSString *) _login - password: (NSString *) _pwd + password: (NSString *) _pwd { NSString *username, *password, *domain, *value; SOGoPasswordPolicyError perr; @@ -168,7 +168,7 @@ perr: _perr expire: _expire grace: _grace - useCache: _useCache]; + useCache: _useCache]; //[self logWithFormat: @"Checked login with ppolicy enabled: %d %d %d", *_perr, *_expire, *_grace]; @@ -283,17 +283,19 @@ session = [SOGoCASSession CASSessionWithIdentifier: password fromProxy: NO]; - // We must NOT assume the scheme exists - scheme = [server scheme]; + // We must NOT assume the scheme exists + scheme = [server scheme]; - if (!scheme) - scheme = @"imap"; + if (!scheme) + scheme = @"imap"; - service = [NSString stringWithFormat: @"%@://%@", scheme, [server host]]; + service = [NSString stringWithFormat: @"%@://%@", scheme, [server host]]; if (renew) [session invalidateTicketForService: service]; + password = [session ticketForService: service]; + if ([password length] || renew) [session updateCache]; } @@ -322,8 +324,8 @@ /* create SOGoUser */ - (SOGoUser *) userWithLogin: (NSString *) login - andRoles: (NSArray *) roles - inContext: (WOContext *) ctx + andRoles: (NSArray *) roles + inContext: (WOContext *) ctx { /* the actual factory method */ return [SOGoUser userWithLogin: login roles: roles]; @@ -339,7 +341,7 @@ NSString *auth; auth = [[context request] - cookieValueForKey: [self cookieNameInContext:context]]; + cookieValueForKey: [self cookieNameInContext:context]]; if ([auth isEqualToString: @"discard"]) { [context setObject: [NSArray arrayWithObject: SoRole_Anonymous] @@ -353,8 +355,8 @@ } - (void) setupAuthFailResponse: (WOResponse *) response - withReason: (NSString *) reason - inContext: (WOContext *) context + withReason: (NSString *) reason + inContext: (WOContext *) context { WOComponent *page; WORequest *request;