|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.szegedi.spring.web.jsflow.codec.IntegrityCodec
public class IntegrityCodec
A codec that will add a digital signature to the flowstate when encoding, and
check the validity of the signature (and strip it) upon decoding. If the
signature is not valid, it will throw a
FlowStateStorageException. It is highly
recommended to use this codec with
ClientSideFlowStateStorage as it
prevents the client from tampering the state.
| Constructor Summary | |
|---|---|
IntegrityCodec()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
OneWayCodec |
createDecoder()
Create a one-way single-threaded, nonshared codec instance able to decode a state as received from the client or from an upstream codec. |
OneWayCodec |
createEncoder()
Create a one-way single-threaded, nonshared codec instance able to encode a state as should be sent to a client or a downstream codec. |
void |
setKeyPair(java.security.KeyPair keyPair)
Sets the pair of a matching private and public key used to sign the serialized webflow states and to check the signature validity. |
void |
setSignatureAlgorithmName(java.lang.String signatureAlgorithmName)
Sets the name of the signature algorithm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntegrityCodec()
| Method Detail |
|---|
public void setKeyPair(java.security.KeyPair keyPair)
GeneratedKeyPairFactory, or even
better a KeyStoreKeyPairFactory to
obtain a key pair.
keyPair - the signing/verifying keypair.public void setSignatureAlgorithmName(java.lang.String signatureAlgorithmName)
signatureAlgorithmName - the signature algorithm name
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception
public OneWayCodec createDecoder()
throws java.lang.Exception
BinaryStateCodec
createDecoder in interface BinaryStateCodecjava.lang.Exception
public OneWayCodec createEncoder()
throws java.lang.Exception
BinaryStateCodec
createEncoder in interface BinaryStateCodecjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||