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
ConstructorsModifierConstructorDescriptionprotectedThis constructor is meant to be used when extending theIdentifiedelement with your custom identification class.Identified(AuthConfig config) This constructor is meant to be used when theIdentifiedelement is used directly as a route in your site. -
Method Summary
Modifier and TypeMethodDescriptionHook method that is called to retrieve theAuthConfigto use.static IdentifiedRetrieve theIdentifiedelement instance that is active in this request.protected voidHook method that is called at the start of the element's processing.voidProcess the providedContextwith this element.void
-
Constructor Details
-
Identified
protected Identified()This constructor is meant to be used when extending theIdentifiedelement 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 theIdentifiedelement 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 theIdentifiedelement 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
nullif 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 theAuthConfigto use.- Returns:
- the config to use for authentication
- Since:
- 1.0
-
process
Description copied from interface:ElementProcess the providedContextwith this element. -
setIdentityAttribute
-
getIdentity
-