public class DefaultSamlTransformer extends java.lang.Object implements SamlTransformer, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
DefaultSamlTransformer(SpringSecuritySaml implementation) |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
Saml2Object |
fromXml(byte[] xml,
java.util.List<SimpleKey> verificationKeys,
java.util.List<SimpleKey> localKeys)
Converts an SAML/XML string into a Java object
|
java.lang.String |
samlDecode(java.lang.String s,
boolean inflate)
base64 decodes and inflates the SAML message.
|
java.lang.String |
samlEncode(java.lang.String s,
boolean deflate)
Deflates and base64 encodes the SAML message readying it for transport.
|
SamlTransformer |
setImplementation(SpringSecuritySaml implementation) |
java.lang.String |
toXml(Saml2Object saml2Object)
Converts a SAML object into an XML string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromXml
public DefaultSamlTransformer(SpringSecuritySaml implementation)
public SamlTransformer setImplementation(SpringSecuritySaml implementation)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public java.lang.String toXml(Saml2Object saml2Object)
toXml
in interface SamlTransformer
saml2Object
- - object to be converted to XMLpublic Saml2Object fromXml(byte[] xml, java.util.List<SimpleKey> verificationKeys, java.util.List<SimpleKey> localKeys)
fromXml
in interface SamlTransformer
xml
- the XML representation of the objectverificationKeys
- Nullable. If not null, object signature will be validated upon conversion.
The implementation will attempt each key until one succeedslocalKeys
- the configured local private keys. Used for decryption when needed.public java.lang.String samlEncode(java.lang.String s, boolean deflate)
samlEncode
in interface SamlTransformer
s
- - original stringdeflate
- - if set to true the DEFLATE encoding will be appliedpublic java.lang.String samlDecode(java.lang.String s, boolean inflate)
samlDecode
in interface SamlTransformer
s
- base64 encoded deflated stringinflate
- - if set to true the value will be deflated