<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 5/4/16 4:30 PM, Stefan Rasmusson
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACdgyci=iMMMDZsUqtc1F4jZXdXd1nJbHq5ijcVd_O8iJb5AWg@mail.gmail.com"
      type="cite">
      <div dir="ltr">There is something I'm not quite getting with the
        handlers. Can't I use the message handlers on the encoders?</div>
    </blockquote>
    <br>
    Yes, you can use a MessageHandler on any MessageContext, client-side
    or server-side.  In general, a MessageDecoder produces an inbound
    MessageContext, which you can then run handlers on.  Then you have
    your profile or flow logic. Then you construct and populate an
    outbound MessageContext.  You can then run handlers on that, and
    then it is encoded with a MessageDecoder.<br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:CACdgyci=iMMMDZsUqtc1F4jZXdXd1nJbHq5ijcVd_O8iJb5AWg@mail.gmail.com"
      type="cite">
      <div dir="ltr"> I have managed to use them on the SOAP pipeline,
        but how can I use the MessageLifetimeSecurityHandler with
        the HTTPRedirectDeflateDecoder?<br>
      </div>
    </blockquote>
    <br>
    That's a server-side decoder, implementing that SAML binding.  It's
    going to produce a MessageContext, on which you can then run
    handlers.  Exactly *how* you do that is up to your code.  For
    example, the Shibboleth IdP is based on Spring Web Flow, and so we
    have flow actions that handle running one or more handlers on
    message contexts, both inbound and outbound.  That would be a good
    real world example to look at.<br>
    <br>
    In the pipeline-based SOAP client, it's the client impl that
    "orchestrates" the encoding, decoding and running the various
    handlers and the appropriate time. On the server side, order of
    operations is reversed.  It's going to be something else that
    orchestrates the execution of the logical message pipeline.  If not
    SWF, then you might do that in a servlet, or MVC controller or
    whatever.  It's going to be determined by your server-side design
    and framework.<br>
    <br>
    We don't use it in the IdP, but in package
    org.opensaml.messaging.pipeline.servlet I did add an interface and
    basic impl for a server-side pipeline, for holding the encoders,
    decoders and handlers, specialized for the server-side
    HttpServletRequest/-Response case..  Calling those would be up to
    you however, since it can't know how the "business logic" in the
    middle is going to work, and what the overall execution environment
    looks like.  <br>
  </body>
</html>