class Kemal::Authorizer::AuthorizationHandler
- Kemal::Authorizer::AuthorizationHandler
- Kemal::Authorizer::BaseHandler
- Kemal::Handler
- Reference
- Object
Overview
Kemal::Authorizer::AuthorizationHandler
is a middleware that makes sure that
only authenticated admin users can visit the specified routes.
Kemal::Authorizer::AuthorizationHandler.new({
"/admin" => ["GET"],
})
If an user that is not an admin tries to visit "/admin" the user will be redirected to "/login?next=%2Fadmin".