Package org.apache.myfaces.util.token
Class SessionIdGenerator
java.lang.Object
org.apache.myfaces.util.token.SessionIdGenerator
NOTE: Class taken from tomcat 7 org.apache.catalina.util.SessionIdGenerator
and used here as an alternative for server side state token encryption.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate and return a new session identifier.void
getRandomBytes
(byte[] bytes) void
setJvmRoute
(String jvmRoute) Specify the node identifier associated with this node which will be included in the generated session ID.void
setSecureRandomAlgorithm
(String secureRandomAlgorithm) Specify a non-default algorithm to use to generate random numbers.void
setSecureRandomClass
(String secureRandomClass) Specify a non-default @{linkSecureRandom
implementation to use.void
setSecureRandomProvider
(String secureRandomProvider) Specify a non-default provider to use to generate random numbers.void
setSessionIdLength
(int sessionIdLength) Specify the number of bytes for a session ID
-
Constructor Details
-
SessionIdGenerator
public SessionIdGenerator()
-
-
Method Details
-
setSecureRandomClass
Specify a non-default @{linkSecureRandom
implementation to use.- Parameters:
secureRandomClass
- The fully-qualified class name
-
setSecureRandomAlgorithm
Specify a non-default algorithm to use to generate random numbers.- Parameters:
secureRandomAlgorithm
- The name of the algorithm
-
setSecureRandomProvider
Specify a non-default provider to use to generate random numbers.- Parameters:
secureRandomProvider
- The name of the provider
-
setJvmRoute
Specify the node identifier associated with this node which will be included in the generated session ID.- Parameters:
jvmRoute
- The node identifier
-
setSessionIdLength
public void setSessionIdLength(int sessionIdLength) Specify the number of bytes for a session ID- Parameters:
sessionIdLength
- Number of bytes
-
generateSessionId
Generate and return a new session identifier. -
getRandomBytes
public void getRandomBytes(byte[] bytes)
-