This WSS4J unit test might help you - it shows how to add a custom
Attribute:

https://github.com/apache/wss4j/blob/94f0e42d03011fa97122bcd495d268ff33a5107f/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java#L578

Colm.

On Mon, Jan 29, 2018 at 3:42 PM, Tóth Csaba <[email protected]> wrote:

> Hello!
>
> I need to put an XML fragment to one of the SAML Attribute:
>
> <saml-a:Attribute xmlns:saml-a="urn:oasis:names:tc:SAML:2.0:assertion"
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
> <saml-a:AttributeValue xmlns:xsi="http://www.w3.org/
> 2001/XMLSchema-instance">
>         <PurposeOfUse xmlns=" .... " xsi:type=" ... " attr1=" ... "
> attr2=" ... "/>
> </saml-a:AttributeValue>
> </saml-a:Attribute>
>
> (the xsi:type is not an standard schema type)
>
> I get this information from an Claim. I parse already, and I have all
> the fields. I need some solution how can I put to the requestClaim ant
> the ClaimParser
> I try to use the OpenSAML, to create a AttributeValue, but I dont know
> how to create the PurposeOfUse element.
>
> Any idee?
> Thanx
>
> Csaba
>
>
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to