← Back to Kairo Docs|API Reference (Dokka)

Package-level declarations

Types

Link copied to clipboard
abstract class AuthConfig

Configures authentication for all REST endpoints in the Server.

Link copied to clipboard
class AuthReceiver<E : RestEndpoint<*, *>>

Provides the authentication context within an auth block. Use public for unauthenticated endpoints or verify for JWT-protected endpoints.

Link copied to clipboard
data class VerifierConfig(val jwkUrl: String, val issuer: String, val audience: String? = null, val claims: Map<String, String> = emptyMap(), val leeway: Duration)

Configuration for JWT verification using RSA256 with a JWKS endpoint.

Properties

Link copied to clipboard
var Application.authConfig: AuthConfig?
Link copied to clipboard
var Application.koin: Koin

Functions

Link copied to clipboard

Marks the endpoint as publicly accessible, skipping authentication.

Link copied to clipboard
fun AuthReceiver<*>.verify(config: VerifierConfig): JWTPrincipal

Verifies the JWT from the request. Throws NoJwt if no token is present, ExpiredJwt if expired, or JwtVerificationFailed for other verification failures.