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

org.http4k.contract.security.BasicAuthSecurity.kt Maven / Gradle / Ivy

There is a newer version: 5.31.0.0
Show newest version
package org.http4k.contract.security

import org.http4k.core.Credentials
import org.http4k.core.Filter
import org.http4k.filter.ServerFilters

/**
 * Checks the presence of basic auth credentials. Filter returns 401 if auth fails.
 */
class BasicAuthSecurity(realm: String, credentials: Credentials, val name: String = "basicAuth") : Security {
    override val filter: Filter = ServerFilters.BasicAuth(realm, credentials)

    companion object
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy