org.jboss.seam.ui.renderkit
public class TokenRendererBase extends RendererBase
The TokenRendererBase renders the form's signature as a hidden form field for the UIToken component. If the renderStampStore component is enabled, the actually signature will be stored in the session and the key to this token store in the hidden form field, providing the same guarantee for client-side state saving as with server-side state saving.
The form signature is calculated as follows:
sha1(signature = contextPath + viewId + "," + formClientId + random alphanum, salt = clientUid)
The developer can also choose to incorporate the session id into this hash to generate a more secure token (at the cost of binding it to the session) by setting the requireSession attribute to true. Then the calculation becomes:
sha1(signature = contextPath + viewId + "," + formClientId + "," + random alphanum + sessionId, salt = clientUid)
The decode method performs the following steps:
If all of that passes, we are okay to process the form (advance to validate phase as decode() is called in apply request values).
UnauthorizedCommandException| Modifier and Type | Field and Description |
|---|---|
static String |
FORM_SIGNATURE_PARAM |
static String |
RENDER_STAMP_ATTR |
JAVASCRIPT_NAMESPACE| Constructor and Description |
|---|
TokenRendererBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDecode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Template method for custom decoding of concrete renderer.
|
protected void |
doEncodeBegin(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Template method for custom start encoding of concrete renderer.
|
protected Class |
getComponentClass()
Get base component slass , targetted for this renderer.
|
decode, doEncodeChildren, doEncodeEnd, encodeBegin, encodeChildren, encodeEnd, getUtils, preDecode, preEncodeBegin, renderChild, renderChildrenpublic static final String FORM_SIGNATURE_PARAM
public static final String RENDER_STAMP_ATTR
protected Class getComponentClass()
RendererBasegetComponentClass in class RendererBaseprotected void doDecode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
RendererBasedoDecode in class RendererBaseprotected void doEncodeBegin(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
throws IOException
RendererBasedoEncodeBegin in class RendererBaseIOExceptionCopyright © 2015 Seam Framework. All Rights Reserved.