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
ModifierConstructorDescriptionprotected
Logout()
This constructor is meant to be used when extending theLogout
element with your custom logout class.Logout
(AuthConfig config) This constructor is meant to be used when theLogout
element is used directly as a route in your site.Logout
(AuthConfig config, Template template) This constructor is meant to be used when theLogout
element is used directly as a route in your site. -
Method Summary
Modifier and TypeMethodDescriptionHook method that is called to retrieve theAuthConfig
to use.protected Template
Hook method that is called to create the template instance.protected void
Hook method that is called at the start of the element's processing.protected void
Hook method that is called after logging out and before printing the template.void
Process the providedContext
with this element.
-
Constructor Details
-
Logout
protected Logout()This constructor is meant to be used when extending theLogout
element 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 theLogout
element 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 theLogout
element 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 theAuthConfig
to 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; ornull
if no template was set up- Since:
- 1.0
-
process
Description copied from interface:Element
Process the providedContext
with this element.
-