Instead of:
```
from org.jboss.seam.contexts import Contexts
...
context = Contexts.getEventContext()
context.set(param, value)
context.get(param)
```
use:
```
from org.gluu.oxauth.security import Identity
...
identity = CdiUtil.bean(Identity)
identity.setWorkingParameter(param, value)
identity.getWorkingParameter(param)
```
Also ensure you have this method - getExtraParametersForStep():
If required to save session variables between steps, use the getExtraParametersForStep method. The Gluu Server persists these variables in LDAP in able to support stateless, clustered two-step authentications.
Assuming test is a variable that you want to save between steps then a sample code snippet looks like this -
```
def getExtraParametersForStep(self, configurationAttributes, step):
return Arrays.asList("test")
```