public interface SamlTransformer
Modifier and Type | Method and Description |
---|---|
Saml2Object |
fromXml(byte[] xml,
java.util.List<SimpleKey> verificationKeys,
java.util.List<SimpleKey> localKeys)
Converts an SAML/XML string into a Java object
|
default Saml2Object |
fromXml(java.lang.String 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.
|
java.lang.String |
toXml(Saml2Object saml2Object)
Converts a SAML object into an XML string.
|
java.lang.String toXml(Saml2Object saml2Object)
saml2Object
- - object to be converted to XMLdefault Saml2Object fromXml(java.lang.String xml, java.util.List<SimpleKey> verificationKeys, java.util.List<SimpleKey> localKeys)
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.SignatureException
- if signature validation
failsjava.lang.IllegalArgumentException
- if the XML object
structure
is not
recognized or implemetedSaml2Object fromXml(byte[] xml, java.util.List<SimpleKey> verificationKeys, java.util.List<SimpleKey> localKeys)
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.SignatureException
- if signature validation
failsjava.lang.IllegalArgumentException
- if the XML object
structure
is not
recognized or implemetedjava.lang.String samlEncode(java.lang.String s, boolean deflate)
s
- - original stringdeflate
- - if set to true the DEFLATE encoding will be appliedjava.lang.String samlDecode(java.lang.String s, boolean inflate)
s
- base64 encoded deflated stringinflate
- - if set to true the value will be deflated