All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infobip.kafkistry.webapp.security.auth.preauth.PreAuthenticatedUserProcessingFiler.kt Maven / Gradle / Ivy

The newest version!
package com.infobip.kafkistry.webapp.security.auth.preauth

import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
import jakarta.servlet.http.HttpServletRequest

class PreAuthenticatedUserProcessingFiler(
        private val resolvers: List
)  : AbstractPreAuthenticatedProcessingFilter() {

    override fun getPreAuthenticatedPrincipal(request: HttpServletRequest): Any? {
        return resolvers.asSequence()
                .mapNotNull { it.getPreAuthenticatedPrincipal(request) }
                .firstOrNull()
    }

    override fun getPreAuthenticatedCredentials(request: HttpServletRequest): Any {
        return "N/A"
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy