← Back to Kairo Docs|API Reference (Dokka)

AuthReceiver

class AuthReceiver<E : RestEndpoint<*, *>>

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

Properties

Link copied to clipboard
val call: RoutingCall
Link copied to clipboard
val endpoint: E

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.