Package rife.authentication.elements
Class Identified
java.lang.Object
rife.authentication.elements.Identified
- All Implemented Interfaces:
Element
- Direct Known Subclasses:
Authenticated
,Login
Tries to identify a user and store that as a request attribute.
This element can be used to customize to behavior when a user is logged in, without requiring authentication for guests.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
This constructor is meant to be used when extending theIdentified
element with your custom identification class.Identified
(AuthConfig config) This constructor is meant to be used when theIdentified
element is used directly as a route in your site. -
Method Summary
Modifier and TypeMethodDescriptionHook method that is called to retrieve theAuthConfig
to use.static Identified
Retrieve theIdentified
element instance that is active in this request.protected void
Hook method that is called at the start of the element's processing.void
Process the providedContext
with this element.void
-
Constructor Details
-
Identified
protected Identified()This constructor is meant to be used when extending theIdentified
element with your custom identification class.Don't forget to also override the `getAuthConfig()` methods.
- Since:
- 1.0
-
Identified
This constructor is meant to be used when theIdentified
element is used directly as a route in your site.When extending this element, use the default constructor instead and override the `getAuthConfig()` method.
- Parameters:
config
- the auth config to use- Since:
- 1.0
-
-
Method Details
-
getIdentifiedElementInRequest
Retrieve theIdentified
element instance that is active in this request.- Parameters:
c
- the processing context that will be used for the lookup- Returns:
- this request's identified element instance; or
null
if it can't be found - Since:
- 1.0
-
initializeIdentified
Hook method that is called at the start of the element's processing.- Parameters:
c
- the element processing context- Since:
- 1.0
-
getAuthConfig
Hook method that is called to retrieve theAuthConfig
to use.- Returns:
- the config to use for authentication
- Since:
- 1.0
-
process
Description copied from interface:Element
Process the providedContext
with this element. -
setIdentityAttribute
-
getIdentity
-