diff --git a/Documentation/SOGoInstallationGuide.asciidoc b/Documentation/SOGoInstallationGuide.asciidoc index ae9951da9..372f6b4f8 100644 --- a/Documentation/SOGoInstallationGuide.asciidoc +++ b/Documentation/SOGoInstallationGuide.asciidoc @@ -1612,7 +1612,7 @@ Defaults to `0` when unset. |S |SOGoOpenIdLogoutEnabled |Allow user to end their openId with the webmail. Meaning that will disconnect them from -the others applicaitons as well. +the others applicaitons as well. The openid server must have a end_session_endpoint. Defaults to `NO` when unset. |======================================================================= diff --git a/SoObjects/SOGo/SOGoOpenIdSession.m b/SoObjects/SOGo/SOGoOpenIdSession.m index 024d27e15..0dda9b5c2 100644 --- a/SoObjects/SOGo/SOGoOpenIdSession.m +++ b/SoObjects/SOGo/SOGoOpenIdSession.m @@ -238,7 +238,9 @@ static BOOL SOGoOpenIDDebugEnabled = YES; self->authorizationEndpoint = [config objectForKey: @"authorization_endpoint"]; self->tokenEndpoint = [config objectForKey: @"token_endpoint"]; self->userinfoEndpoint = [config objectForKey: @"userinfo_endpoint"]; - self->endSessionEndpoint = [config objectForKey: @"end_session_endpoint"]; + + if([config objectForKey: @"end_session_endpoint"]) + self->endSessionEndpoint = [config objectForKey: @"end_session_endpoint"]; //Optionnals? if([config objectForKey: @"introspection_endpoint"]) @@ -346,7 +348,8 @@ static BOOL SOGoOpenIDDebugEnabled = YES; ASSIGN (authorizationEndpoint, [sessionDict objectForKey: @"authorization_endpoint"]); ASSIGN (tokenEndpoint, [sessionDict objectForKey: @"token_endpoint"]); ASSIGN (userinfoEndpoint, [sessionDict objectForKey: @"userinfo_endpoint"]); - ASSIGN (endSessionEndpoint, [sessionDict objectForKey: @"end_session_endpoint"]); + if([sessionDict objectForKey: @"end_session_endpoint"]) + ASSIGN (endSessionEndpoint, [sessionDict objectForKey: @"end_session_endpoint"]); //Optionnals? if([sessionDict objectForKey: @"introspection_endpoint"]) @@ -370,7 +373,8 @@ static BOOL SOGoOpenIDDebugEnabled = YES; [sessionDict setObject: authorizationEndpoint forKey: @"authorization_endpoint"]; [sessionDict setObject: tokenEndpoint forKey: @"token_endpoint"]; [sessionDict setObject: userinfoEndpoint forKey: @"userinfo_endpoint"]; - [sessionDict setObject: endSessionEndpoint forKey: @"end_session_endpoint"]; + if(endSessionEndpoint) + [sessionDict setObject: endSessionEndpoint forKey: @"end_session_endpoint"]; //Optionnals? if(introspectionEndpoint)