fix(openid): make end_session_endpoint optional

This commit is contained in:
Hivert Quentin
2025-05-13 16:03:13 +02:00
parent bc4c9ba0e6
commit c5fb3482e2
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -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.
|=======================================================================
+7 -3
View File
@@ -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)