Package rife.authentication.elements
Class Logout
java.lang.Object
rife.authentication.elements.Logout
- All Implemented Interfaces:
Element
Provides logout logic with an optional template that can be printed for
configuration.
To customize the behavior of the authentication, it's the easiest to override one of the hook methods.
- Since:
- 1.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLogout()This constructor is meant to be used when extending theLogoutelement with your custom logout class.Logout(AuthConfig config) This constructor is meant to be used when theLogoutelement is used directly as a route in your site.Logout(AuthConfig config, Template template) This constructor is meant to be used when theLogoutelement is used directly as a route in your site. -
Method Summary
Modifier and TypeMethodDescriptionHook method that is called to retrieve theAuthConfigto use.protected TemplateHook method that is called to create the template instance.protected voidHook method that is called at the start of the element's processing.protected voidHook method that is called after logging out and before printing the template.voidProcess the providedContextwith this element.
-
Constructor Details
-
Logout
protected Logout()This constructor is meant to be used when extending theLogoutelement with your custom logout class.Don't forget to also override the `getAuthConfig()` and `getTemplate()` methods.
- Since:
- 1.0
-
Logout
This constructor is meant to be used when theLogoutelement is used directly as a route in your site.When extending this element, use the default constructor instead and override the `getAuthConfig()` and `getTemplate()` methods.
- Parameters:
config- the auth config to use- Since:
- 1.0
-
Logout
This constructor is meant to be used when theLogoutelement is used directly as a route in your site.When extending this element, use the default constructor instead and override the `getAuthConfig()` and `getTemplate()` methods.
- Parameters:
config- the auth config to usetemplate- the template instance blueprint to use- Since:
- 1.0
-
-
Method Details
-
getAuthConfig
Hook method that is called to retrieve theAuthConfigto use.- Returns:
- the config to use for authentication
- Since:
- 1.0
-
getTemplate
Hook method that is called to create the template instance.- Returns:
- the template to use for logout
- Since:
- 1.0
-
initializeLogout
Hook method that is called at the start of the element's processing.- Parameters:
c- the element processing context- Since:
- 1.0
-
loggedOut
Hook method that is called after logging out and before printing the template.- Parameters:
template- the template that will be printed; ornullif no template was set up- Since:
- 1.0
-
process
Description copied from interface:ElementProcess the providedContextwith this element.
-