Skip to content

Commit bba05d6

Browse files
committed
Load the available CA in the API when invoking the openid-connect/logout remote IDP endpoint.
1 parent b378b8c commit bba05d6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

restapi/user_logout.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package restapi
1818

1919
import (
2020
"context"
21+
"crypto/tls"
2122
"encoding/base64"
2223
"encoding/json"
2324
"net/http"
@@ -101,7 +102,14 @@ func logoutFromIDPProvider(r *http.Request, state string) error {
101102
params.Add("client_id", providerCfg.ClientID)
102103
params.Add("client_secret", providerCfg.ClientSecret)
103104
params.Add("refresh_token", refreshToken.Value)
104-
_, err := http.PostForm(providerCfg.EndSessionEndpoint, params)
105+
client := &http.Client{
106+
Transport: &http.Transport{
107+
TLSClientConfig: &tls.Config{
108+
RootCAs: GlobalRootCAs,
109+
},
110+
},
111+
}
112+
_, err := client.PostForm(providerCfg.EndSessionEndpoint, params)
105113
if err != nil {
106114
return err
107115
}

0 commit comments

Comments
 (0)