Marshalling RequestSecurityToken
Brent Putman
putmanb at georgetown.edu
Mon Mar 19 19:39:54 GMT 2012
On 3/19/12 12:22 PM, Gina Choi wrote:
>
> Does the following code fit to your original design?
>
Yes, that looks correct.
>
> I need to build Header similar to the following example. User name and
> password is used to get RequestSecurityToken, but I am looking for solutions
> to get RequestSecurityTokenrResponse in exchange of existing assertion token
> that I have. Suppose, that I want to build following Header, which package of
> the OpenSAML should I use to build Header elements?
>
>
> Header header = envelope.getHeader();
>
>
>
> <s:Header>
> <a:Action
> s:mustUnderstand="1">http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Iss
> ue
> </a:Action>
> <a:To
> s:mustUnderstand="1">https://yourcompany.com/adfs/services/trust/13/UsernameM
> ixed</a:To>
> <o:Security s:mustUnderstand="1" mlns:o="...">
> <o:UsernameToken u:Id="uuid-6a13a244-dac6-42c1-84c5-cbb345b0c4c4-1">
> <o:Username>Leandro Boffi</o:Username>
> <o:Password Type="...">P at ssw0rd!</o:Password>
> </o:UsernameToken>
> </o:Security>
> </s:Header>
>
It's the same as all the other stuff. You build a Header, you set it on
the Envelope. You build a WS-Addressing Action, then add it as a child
of the Header, etc.
We do have support for all of those elements above, from the
WS-Addressing and WS-Security specs. All are in openws. So you
shouldn't have a problem generating the above XML with OpenSAML.
More information about the dev
mailing list