@Service(value="blStaleStateProtectionService") public class StaleStateProtectionServiceImpl extends Object implements StaleStateProtectionService
StaleStateProtectionService
Modifier and Type | Field and Description |
---|---|
protected boolean |
staleStateProtectionEnabled |
static String |
STATEVERSIONTOKEN |
static String |
STATEVERSIONTOKENPARAMETER |
Constructor and Description |
---|
StaleStateProtectionServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
compareToken(String passedToken)
Compare the state version token provided by the request to what is resident in the user session.
|
String |
getStateVersionToken()
Retrieve the state version token resident in the user's session, or create one if it doesn't exist.
|
String |
getStateVersionTokenParameter()
Retrieve the parameter key used to harvest the state version token value from the request
|
void |
invalidateState()
Remove the current state version token in the user's session, if exists.
|
boolean |
isEnabled()
Whether or not the protection provided by this service is active.
|
public static final String STATEVERSIONTOKEN
public static final String STATEVERSIONTOKENPARAMETER
@Value(value="${stale.state.protection.enabled:false}") protected boolean staleStateProtectionEnabled
public void compareToken(String passedToken)
StaleStateProtectionService
StaleStateServiceException
is emitted.compareToken
in interface StaleStateProtectionService
passedToken
- the state version token from the requestpublic String getStateVersionToken()
StaleStateProtectionService
getStateVersionToken
in interface StaleStateProtectionService
public void invalidateState()
StaleStateProtectionService
invalidateState
in interface StaleStateProtectionService
public boolean isEnabled()
StaleStateProtectionService
isEnabled
in interface StaleStateProtectionService
public String getStateVersionTokenParameter()
StaleStateProtectionService
getStateVersionTokenParameter
in interface StaleStateProtectionService
Copyright © 2017. All rights reserved.