Class EncryptedAttributeImpl
- java.lang.Object
-
- com.sun.identity.saml2.assertion.impl.EncryptedAttributeImpl
-
- All Implemented Interfaces:
EncryptedAttribute,EncryptedElement
public class EncryptedAttributeImpl extends Object implements EncryptedAttribute
This is an implementation of interfaceEncryptedAttribute. TheEncryptedAttributeelement represents a SAML attribute in encrypted fashion. It's of typeEncryptedElementType.<element name="EncryptedAttribute" type="{urn:oasis:names:tc:SAML:2.0:assertion}EncryptedElementType"/>
-
-
Constructor Summary
Constructors Constructor Description EncryptedAttributeImpl(String xmlString)Class constructor withEncryptedAttributein xml string format.EncryptedAttributeImpl(Element element)Class constructor withEncryptedAttributeinElementformat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attributedecrypt(Set<PrivateKey> privateKeys)Returns an instance ofAttributeobject.StringtoXMLString()Returns a String representation of the element.StringtoXMLString(boolean includeNS, boolean declareNS)Returns a String representation of the element.
-
-
-
Constructor Detail
-
EncryptedAttributeImpl
public EncryptedAttributeImpl(Element element) throws SAML2Exception
Class constructor withEncryptedAttributeinElementformat.- Throws:
SAML2Exception
-
EncryptedAttributeImpl
public EncryptedAttributeImpl(String xmlString) throws SAML2Exception
Class constructor withEncryptedAttributein xml string format.- Throws:
SAML2Exception
-
-
Method Detail
-
decrypt
public Attribute decrypt(Set<PrivateKey> privateKeys) throws SAML2Exception
Description copied from interface:EncryptedAttributeReturns an instance ofAttributeobject.- Specified by:
decryptin interfaceEncryptedAttribute- Parameters:
privateKeys- Private keys of the recipient used to decrypt the secret key.- Returns:
Attributeobject.- Throws:
SAML2Exception- if error occurs.
-
toXMLString
public String toXMLString() throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceEncryptedElement- Returns:
- A string containing the valid XML for this element. By default name space name is prepended to the element name.
- Throws:
SAML2Exception- if the object does not conform to the schema.
-
toXMLString
public String toXMLString(boolean includeNS, boolean declareNS) throws SAML2Exception
Returns a String representation of the element.- Specified by:
toXMLStringin interfaceEncryptedElement- Parameters:
includeNS- Determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS- Determines whether or not the namespace is declared within the Element.- Returns:
- A string containing the valid XML for this element
- Throws:
SAML2Exception- if the object does not conform to the schema.
-
-