Loading ...
Sorry, an error occurred while loading the content.

Ticket authentication done on the server level before dispatch...

Expand Messages
  • Kent Sandvik
    Hi, I m trying to implement a global ticket-based authentication system where the ticket info is passed in a //authInfo SOAP field or something similar between
    Message 1 of 2 , Nov 16, 2001
    View Source
    • 0 Attachment
      Hi, I'm trying to implement a global ticket-based authentication system
      where the ticket info is passed in a //authInfo SOAP field or something
      similar between the client and server (after an initial login sequence), but
      after this the authInfo should be parsed and verified *before* the
      dispatch_to is happening on the SOAP server side. This way I don't need to
      worry and implement authentication handling in each module called, rather
      it's done globally before the modules are called.

      I'm just not sure how to go about doing it, I could create my own
      SOAP::Transport::HTTP::Daemon with a new handle function, where the requeste
      come in and are handled, and then the response is sent back, but I'm not
      sure how to fetch any SOAP header information at this level. Any pointers
      highly appreciated. Thx, Kent
    • Paul Kulchenko
      Hi, Kent! Probably the easiest (niciest? ;)) way to do that is to override on_dispatch method for SOAP::Server, check authInfo and decide what to do. my
      Message 2 of 2 , Nov 19, 2001
      View Source
      • 0 Attachment
        Hi, Kent!

        Probably the easiest (niciest? ;)) way to do that is to override
        on_dispatch method for SOAP::Server, check authInfo and decide what
        to do.

        my $daemon = SOAP::Transport::HTTP::Daemon
        -> new (LocalPort => 80)
        -> on_dispatch(sub {
        my $env = shift;
        die "no auth info\n" unless ref $env->valueof('//authinfo');
        die "wrong auth info\n" unless .... # check for auth info here
        return; # if everything is ok and we want to use default dispatch
        # -- OR -- dispatch to specific class/method
        return 'http://company.com/My/Class', 'method'; # URI, method
        })
        -> dispatch_to('add')
        ;
        print "Contact to SOAP server at ", $daemon->url, "\n";
        $daemon->handle;

        All other processing (check for dispatch_with and dispatch_to) will
        still be done. on_dispatch method allows you to specify URI and
        method dynamically, instead of those that specified in envelope. Hope
        it helps. Let me know if you have any problems with that.

        Best wishes, Paul.

        --- Kent Sandvik <sandvik@...> wrote:
        > Hi, I'm trying to implement a global ticket-based authentication
        > system
        > where the ticket info is passed in a //authInfo SOAP field or
        > something
        > similar between the client and server (after an initial login
        > sequence), but
        > after this the authInfo should be parsed and verified *before* the
        > dispatch_to is happening on the SOAP server side. This way I don't
        > need to
        > worry and implement authentication handling in each module called,
        > rather
        > it's done globally before the modules are called.
        >
        > I'm just not sure how to go about doing it, I could create my own
        > SOAP::Transport::HTTP::Daemon with a new handle function, where the
        > requeste
        > come in and are handled, and then the response is sent back, but
        > I'm not
        > sure how to fetch any SOAP header information at this level. Any
        > pointers
        > highly appreciated. Thx, Kent
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Find the one for you at Yahoo! Personals
        http://personals.yahoo.com
      Your message has been successfully submitted and would be delivered to recipients shortly.