You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ktor-server/ktor-server-plugins/ktor-server-auth-saml/jvm/src/io/ktor/server/auth/saml/SamlAuthenticationProvider.kt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -292,6 +292,11 @@ public class SamlAuthenticationProvider internal constructor(
292
292
val samlResponse = parameters["SAMLResponse"]
293
293
294
294
when {
295
+
samlRequest !=null&& samlResponse !=null-> {
296
+
logger.debug("SLO endpoint failed. Both `SAMLRequest` and `SAMLRequest` are present")
Copy file name to clipboardExpand all lines: ktor-server/ktor-server-plugins/ktor-server-auth-saml/jvm/src/io/ktor/server/auth/saml/SamlLogoutProcessor.kt
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -164,12 +164,15 @@ internal class SamlLogoutProcessor(
164
164
signatureParam:String? = null,
165
165
signatureAlgorithmParam:String? = null
166
166
): LogoutResult {
167
-
val responseXml = samlResponseBase64.decodeSamlMessage(isDeflated = binding ==SamlBinding.HttpRedirect)
168
-
val document:Document=LibSaml.parserPool.parse(responseXml.toByteArray().inputStream())
169
-
val logoutResponse = document.documentElement.unmarshall<LogoutResponse>()
167
+
val logoutResponse = withValidationException {
168
+
val responseXml = samlResponseBase64.decodeSamlMessage(isDeflated = binding ==SamlBinding.HttpRedirect)
169
+
val document:Document=LibSaml.parserPool.parse(responseXml.toByteArray().inputStream())
Copy file name to clipboardExpand all lines: ktor-server/ktor-server-plugins/ktor-server-auth-saml/jvm/src/io/ktor/server/auth/saml/SamlResponseProcessor.kt
+11-16Lines changed: 11 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -98,36 +98,31 @@ internal class SamlResponseProcessor(
98
98
* @throws SamlValidationException if validation fails
Copy file name to clipboardExpand all lines: ktor-server/ktor-server-plugins/ktor-server-auth-saml/jvm/test/io/ktor/server/auth/saml/SamlLogoutIntegrationTest.kt
+65-6Lines changed: 65 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -123,33 +123,79 @@ class SamlLogoutIntegrationTest {
123
123
fun`test LogoutResponse processing with success and failure status`() = testApplication {
124
124
configureSamlAuth(enableSingleLogout =true)
125
125
126
+
val testClient = noRedirectsClient()
127
+
128
+
// Initiate SP-initiated logout to populate session with logoutRequestId
129
+
val initiateResponse = testClient.get("/test-logout")
0 commit comments