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