diff --git a/conf/authen_saml2.conf.dist b/conf/authen_saml2.conf.dist index 7e15974c67..d11495f0d3 100644 --- a/conf/authen_saml2.conf.dist +++ b/conf/authen_saml2.conf.dist @@ -134,4 +134,11 @@ $saml2{sp}{private_key_file} = 'docker-config/idp/certs/saml.pem'; # session for the user with the identity provider. $saml2{sp}{enable_sp_initiated_logout} = 0; +# The URL of the identity provider's single logout service is normally read from +# the SingleLogoutService location in the identity provider's metadata. If the +# identity provider's metadata does not advertise a SingleLogoutService, then +# this can be set to a custom logout URL to use instead. This is only used if +# $saml2{sp}{enable_sp_initiated_logout} is set to 1. +#$saml2{sp}{logout_url} = 'https://idp.example.edu/saml2/logout'; + 1; diff --git a/lib/WeBWorK/Authen/Saml2.pm b/lib/WeBWorK/Authen/Saml2.pm index 6c77f65a0e..e92d6c3832 100644 --- a/lib/WeBWorK/Authen/Saml2.pm +++ b/lib/WeBWorK/Authen/Saml2.pm @@ -277,8 +277,10 @@ sub logout_user ($self) { return unless $idp; my $logoutReq = $self->sp->logout_request( - $idp->slo_url(BINDING_HTTP_REDIRECT), $self->session->{saml2_nameid}, - $idp->format || undef, $self->session->{saml2_session} + $ce->{saml2}{sp}{logout_url} || $idp->slo_url(BINDING_HTTP_REDIRECT), + $self->session->{saml2_nameid}, + $idp->format || undef, + $self->session->{saml2_session} ); debug('Redirecting user to the identity provider for logout');