Package org.apache.myfaces.util.token
Class CsrfSessionTokenFactorySecureRandom
- java.lang.Object
- 
- org.apache.myfaces.util.token.CsrfSessionTokenFactory
- 
- org.apache.myfaces.util.token.CsrfSessionTokenFactorySecureRandom
 
 
- 
 public class CsrfSessionTokenFactorySecureRandom extends CsrfSessionTokenFactory This factory generate a key composed by a counter and a random number. The counter ensures uniqueness, and the random number prevents guess the next session token.- Since:
- 2.2
- Author:
- Leonardo Uribe
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringRANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_ALGORITM_PARAMSets the random algorithm to initialize the secure random id generator.static StringRANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_CLASS_PARAMSets the random class to initialize the secure random id generator.static StringRANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_PROVIDER_PARAMSets the random provider to initialize the secure random id generator.- 
Fields inherited from class org.apache.myfaces.util.token.CsrfSessionTokenFactoryRANDOM_KEY_IN_CSRF_SESSION_TOKEN_LENGTH_PARAM, RANDOM_KEY_IN_CSRF_SESSION_TOKEN_LENGTH_PARAM_DEFAULT
 
- 
 - 
Constructor SummaryConstructors Constructor Description CsrfSessionTokenFactorySecureRandom(FacesContext facesContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateToken(FacesContext context)protected byte[]generateKey(FacesContext facesContext)
 
- 
- 
- 
Field Detail- 
RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_CLASS_PARAM@JSFWebConfigParam(since="2.2.0", group="state") public static final String RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_CLASS_PARAMSets the random class to initialize the secure random id generator. By default it uses java.security.SecureRandom- See Also:
- Constant Field Values
 
 - 
RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_PROVIDER_PARAM@JSFWebConfigParam(since="2.2.0", group="state") public static final String RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_PROVIDER_PARAMSets the random provider to initialize the secure random id generator.- See Also:
- Constant Field Values
 
 - 
RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_ALGORITM_PARAM@JSFWebConfigParam(since="2.2.0", defaultValue="SHA1PRNG", group="state") public static final String RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_ALGORITM_PARAMSets the random algorithm to initialize the secure random id generator. By default is SHA1PRNG- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
CsrfSessionTokenFactorySecureRandompublic CsrfSessionTokenFactorySecureRandom(FacesContext facesContext) 
 
- 
 - 
Method Detail- 
generateKeyprotected byte[] generateKey(FacesContext facesContext) 
 - 
createTokenpublic String createToken(FacesContext context) - Specified by:
- createTokenin class- CsrfSessionTokenFactory
 
 
- 
 
-