abstract class BrowserAction
- BrowserAction
- Lucky::Action
- Reference
- Object
Included Modules
- Lucille::ActionHelpers
- Lucky::Paginator::BackendHelpers
- Lucky::ProtectFromForgery
- Lucky::SecureHeaders::SetFrameGuard
- Lucky::SecureHeaders::SetSniffGuard
- Lucky::SecureHeaders::SetXSSGuard
- Shield::ActionHelpers
- Shield::ActionPipes
- Shield::BrowserAction
- Shield::EmailConfirmationHelpers
- Shield::EmailConfirmationPipes
- Shield::LoginHelpers
- Shield::LoginPipes
- Shield::PasswordResetHelpers
- Shield::PasswordResetPipes
Direct Known Subclasses
- BearerLogins::Destroy
- BearerLogins::Index
- BearerLogins::Token::Show
- CurrentLogin::Create
- CurrentLogin::Destroy
- CurrentLogin::New
- CurrentUser::BearerLogins::Create
- CurrentUser::BearerLogins::Destroy
- CurrentUser::BearerLogins::Index
- CurrentUser::BearerLogins::New
- CurrentUser::Create
- CurrentUser::Edit
- CurrentUser::EmailConfirmations::Destroy
- CurrentUser::EmailConfirmations::Index
- CurrentUser::Logins::Destroy
- CurrentUser::Logins::Index
- CurrentUser::New
- CurrentUser::PasswordResets::Destroy
- CurrentUser::PasswordResets::Index
- CurrentUser::Show
- CurrentUser::Update
- EmailConfirmations::Create
- EmailConfirmations::Destroy
- EmailConfirmations::Index
- EmailConfirmations::New
- EmailConfirmations::Token::Show
- EmailConfirmations::Update
- Health::Show
- Home::Index
- Logins::Destroy
- Logins::Index
- PasswordResets::Create
- PasswordResets::Destroy
- PasswordResets::Edit
- PasswordResets::Index
- PasswordResets::New
- PasswordResets::Token::Show
- PasswordResets::Update
- Users::BearerLogins::Destroy
- Users::BearerLogins::Index
- Users::Edit
- Users::EmailConfirmations::Destroy
- Users::EmailConfirmations::Index
- Users::Index
- Users::Logins::Destroy
- Users::Logins::Index
- Users::PasswordResets::Destroy
- Users::PasswordResets::Index
- Users::Show
- Users::Update
Defined in:
actions/browser_action.crConstant Summary
-
AFTER_PIPES =
[set_previous_page_url] of Symbol
-
BEFORE_PIPES =
[verify_accepted_format, protect_from_forgery, disable_caching, require_logged_in, require_logged_out, pin_login_to_ip_address, enforce_login_idle_timeout, check_authorization, set_frame_guard_header, set_sniff_guard_header, set_xss_guard_header] of Symbol
-
EXPOSURES =
[] of Symbol
-
PARAM_DECLARATIONS =
[] of Crystal::Macros::TypeDeclaration
-
ROUTE_SETTINGS =
{prefix: ""}
-
SKIPPED_PIPES =
[pin_login_to_ip_address] of Symbol
Class Method Summary
Instance Method Summary
- #authorize?(user : User) : Bool
- #authorize?(user : Shield::User) : Bool
- #check_authorization
- #current_login
- #current_login? : Login | Nil
- #current_user
- #current_user? : User | Nil
- #disable_caching
- #do_check_authorization_failed
- #do_enforce_login_idle_timeout_failed
- #do_pin_email_confirmation_to_ip_address_failed
- #do_pin_login_to_ip_address_failed
- #do_pin_password_reset_to_ip_address_failed
- #do_require_logged_in_failed
- #do_require_logged_out_failed
- #enforce_login_idle_timeout
- #frame_guard_value : String
- #logged_in? : Bool
- #logged_out? : Bool
- #pin_email_confirmation_to_ip_address
- #pin_login_to_ip_address
- #pin_password_reset_to_ip_address
- #previous_page_url
- #previous_page_url? : String | Nil
- #redirect_back(*, fallback : Lucky::Action.class, status : HTTP::Status, allow_external = false)
- #redirect_back(*, fallback : Lucky::RouteHelper, status : HTTP::Status, allow_external = false)
-
#redirect_back(*, fallback : String, status : Int32 = 302, allow_external : Bool = false)
Redirects the browser to the page that issued the request (the referrer) if possible, otherwise redirects to the provided default fallback location.
- #remote_ip : Socket::IPAddress
- #remote_ip? : Socket::IPAddress | Nil
- #require_logged_in
- #require_logged_out
- #return_url
- #return_url? : String | Nil
- #set_no_referrer_policy
- #set_previous_page_url
Class Method Detail
Instance Method Detail
def redirect_back(*, fallback : Lucky::Action.class, status : HTTP::Status, allow_external = false)
#
def redirect_back(*, fallback : Lucky::RouteHelper, status : HTTP::Status, allow_external = false)
#
Description copied from module Lucky::Redirectable
Redirects the browser to the page that issued the request (the referrer) if possible, otherwise redirects to the provided default fallback location.
The referrer information is pulled from the 'Referer' header on the request. This is an optional header, and if the request is missing this header the fallback will be used.
redirect_back fallback: "/users"
A redirect status can be specified
redirect_back fallback: "/home", status: 301
External referers are ignored by default. It is determined by comparing the referer header to the request host. They can be explicitly allowed if necessary
redirect_back fallback: "/home", allow_external: true