Package-level declarations

Types

Link copied to clipboard
class EnforcementPointKtor(internalEnforcementPoint: EnforcementPoint) : EnforcementPoint

An EnforcementPoint that works with the Ktor Warden feature.

Link copied to clipboard

A Ktor plugin that ensures that all your routes are protected by Warden, or explicitly exempt from authorization.

Link copied to clipboard
data class WardenRoute(val route: String, val behaviour: WardenRouteBehaviour, val methods: Set<HttpMethod> = HttpMethod.DefaultMethods.toSet() + HttpMethod.Options)
Link copied to clipboard

Functions

Link copied to clipboard
fun Route.beforeEach(before: suspend PipelineContext<Unit, ApplicationCall>.() -> Unit, callback: Route.() -> Unit): Route

Allows logic to be executed before any nested route endpoint handlers.

Link copied to clipboard
fun Route.unwarded(callback: Route.() -> Unit): Route

Allow any calls nested within this block to respond without enforcing authorization.

Link copied to clipboard
suspend fun PipelineContext<Unit, ApplicationCall>.unwardedCall(bodyOfCall: suspend PipelineContext<Unit, ApplicationCall>.() -> Unit)

@JvmName(name = "unwardedCallGeneric")
suspend fun PipelineContext<Unit, Any>.unwardedCall(bodyOfCall: suspend PipelineContext<Unit, Any>.() -> Unit)

Allow this call to respond without enforcing authorization.

Link copied to clipboard
fun Route.warded(callback: Route.() -> Unit): Route

Provides context for any nested calls to a EnforcementPointKtor to be registered and allow the call to return successfully if access is granted.

Link copied to clipboard
suspend fun PipelineContext<Unit, ApplicationCall>.wardedCall(bodyOfCall: suspend PipelineContext<Unit, ApplicationCall>.() -> Unit)

@JvmName(name = "wardedCallGeneric")
suspend fun PipelineContext<Unit, Any>.wardedCall(bodyOfCall: suspend PipelineContext<Unit, Any>.() -> Unit)

Provides context for any nested calls to a EnforcementPointKtor to be registered and allow the call to return successfully if access is granted.