Package org.apache.shiro.session.mgt.eis
Class RandomSessionIdGenerator
- java.lang.Object
-
- org.apache.shiro.session.mgt.eis.RandomSessionIdGenerator
-
- All Implemented Interfaces:
SessionIdGenerator
public class RandomSessionIdGenerator extends Object implements SessionIdGenerator
Generates session IDs by using aRandom
instance to generate random IDs. The defaultRandom
implementation is aSecureRandom
with theSHA1PRNG
algorithm.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description RandomSessionIdGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializable
generateId(Session session)
Returns the String value of the configuredRandom
'snextLong()
invocation.Random
getRandom()
void
setRandom(Random random)
-
-
-
Method Detail
-
getRandom
public Random getRandom()
-
setRandom
public void setRandom(Random random)
-
generateId
public Serializable generateId(Session session)
Returns the String value of the configuredRandom
'snextLong()
invocation.- Specified by:
generateId
in interfaceSessionIdGenerator
- Parameters:
session
- theSession
instance to which the ID will be applied.- Returns:
- the String value of the configured
Random
'sRandom.nextLong()
invocation.
-
-