mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-30 02:22:47 +00:00
New domain preference: SOGoIMAPCASServiceName
Set this to the service name expected by the CAS server if it differs from SOGoIMAPServer. This is useful to request a CAS ticket for service imap://imap.domain.com while connecting through imapproxy on imap://127.0.0.1:1143 SOGoDAVAuthenticator is not updated since it doesn't really use the imap code.
This commit is contained in:
@@ -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,13 +284,18 @@
|
||||
session = [SOGoCASSession CASSessionWithIdentifier: password
|
||||
fromProxy: NO];
|
||||
|
||||
// We must NOT assume the scheme exists
|
||||
scheme = [server scheme];
|
||||
service = [sd imapCASServiceName]; // try configured service first
|
||||
if (!service)
|
||||
{
|
||||
// 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];
|
||||
|
||||
Reference in New Issue
Block a user