Merge branch 'fix/cas-service-names'
commit
f24e65b6d8
|
@ -132,7 +132,9 @@
|
|||
|
||||
if (renew)
|
||||
[session invalidateTicketForService: service];
|
||||
|
||||
password = [session ticketForService: service];
|
||||
|
||||
if ([password length] || renew)
|
||||
[session updateCache];
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
- (NSString *) mailDomain;
|
||||
- (NSString *) imapServer;
|
||||
- (NSString *) sieveServer;
|
||||
- (NSString *) imapCASServiceName;
|
||||
- (NSString *) imapAclStyle;
|
||||
- (NSString *) imapAclGroupIdPrefix;
|
||||
- (NSString *) imapFolderSeparator;
|
||||
|
|
|
@ -123,6 +123,11 @@
|
|||
return [self stringForKey: @"SOGoSieveServer"];
|
||||
}
|
||||
|
||||
- (NSString *) imapCASServiceName
|
||||
{
|
||||
return [self objectForKey: @"SOGoIMAPCASServiceName"];
|
||||
}
|
||||
|
||||
#warning should be removed when we make use of imap namespace
|
||||
- (NSString *) imapAclStyle
|
||||
{
|
||||
|
|
|
@ -269,12 +269,13 @@
|
|||
forceRenew: (BOOL) renew
|
||||
{
|
||||
NSString *authType, *password;
|
||||
SOGoSystemDefaults *sd;
|
||||
|
||||
password = [self passwordInContext: context];
|
||||
if ([password length])
|
||||
{
|
||||
authType = [[SOGoSystemDefaults sharedSystemDefaults]
|
||||
authenticationType];
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
authType = [sd authenticationType];
|
||||
if ([authType isEqualToString: @"cas"])
|
||||
{
|
||||
SOGoCASSession *session;
|
||||
|
@ -283,17 +284,24 @@
|
|||
session = [SOGoCASSession CASSessionWithIdentifier: password
|
||||
fromProxy: NO];
|
||||
|
||||
service = [sd imapCASServiceName]; // try configured service first
|
||||
if (!service)
|
||||
{
|
||||
// We must NOT assume the scheme exists
|
||||
scheme = [server scheme];
|
||||
|
||||
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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue