|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.util.TokenProcessor
public class TokenProcessor
Utility methods supporting the generation and validation of transaction tokens, used to avoid duplicate form submits.
$Id: TokenProcessor.java 464373 2006-10-16 04:21:54Z rahul $
| Constructor Summary | |
|---|---|
TokenProcessor()
|
|
| Method Summary | |
|---|---|
String |
generate(javax.faces.context.FacesContext context)
Generate and return the next transaction token value, and store it so that it may be verified on a subsequent form submit. |
boolean |
verify(javax.faces.context.FacesContext context,
String token)
Verify that the specified transaction token value (retrieved from an incoming request) is a valid transaaction token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenProcessor()
| Method Detail |
|---|
public String generate(javax.faces.context.FacesContext context)
Generate and return the next transaction token value, and store it so that it may be verified on a subsequent form submit.
context - FacesContext for the current request
public boolean verify(javax.faces.context.FacesContext context,
String token)
Verify that the specified transaction token value (retrieved from an incoming request) is a valid transaaction token. In addition, remove it from any stored cache of tokens, so that it may not be reused.
context - FacesContext for the current requesttoken - Transaction token to be verified
True if this token has been verified,
else false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||