ForbiddenHandler

Handles authorization failure for a role-protected typed route.

The handler receives the current RoutingContext and the roles required by the route.

Report a problem

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
context(principalContext: PrincipalContext<P>, authenticatedContext: C, rolesContext: RolesContext<P, R>)
abstract suspend fun RoutingContext.onForbidden()

Invoked when authentication succeeds, but the principal lacks any roles required by the route.