@@ -133,9 +133,12 @@ class DefaultOpenIdConnectClient(
133133 val endpoint = config.endpoints?.endSessionEndpoint?.trim()
134134 if (! endpoint.isNullOrEmpty()) {
135135 val url = URLBuilder (endpoint)
136- val response = httpClient.submitForm {
136+ val response = httpClient.submitForm(
137+ formParameters = parameters {
138+ append(" id_token_hint" , idToken)
139+ }
140+ ) {
137141 url(url.build())
138- parameter(" id_token_hint" , idToken)
139142 configure?.invoke(this )
140143 }
141144 response.status
@@ -149,11 +152,14 @@ class DefaultOpenIdConnectClient(
149152 val endpoint = config.endpoints?.revocationEndpoint?.trim()
150153 if (! endpoint.isNullOrEmpty()) {
151154 val url = URLBuilder (endpoint)
152- val response = httpClient.submitForm {
155+ val response = httpClient.submitForm(
156+ formParameters = parameters {
157+ append(" token" , token)
158+ append(" client_id" , config.clientId ? : run { throw OpenIdConnectException .InvalidConfiguration (" clientId is missing" ) })
159+ config.clientSecret?.let { append(" client_secret" , it) }
160+ }
161+ ) {
153162 url(url.build())
154- parameter(" token" , token)
155- parameter(" client_id" , config.clientId ? : run { throw OpenIdConnectException .InvalidConfiguration (" clientId is missing" ) })
156- config.clientSecret?.let { parameter(" client_secret" , it) }
157163 configure?.invoke(this )
158164 }
159165 response.status
0 commit comments