Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

soaplite · SOAP::Lite for Perl (soaplite.com)

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1205
  • Category: Protocols
  • Founded: Jan 28, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Ticket authentication done on the server level before dispatch...   Topic List   < Prev Topic  |  Next Topic >
Summarize Messages | View Threaded Sort by Date v  
#1013 From: Paul Kulchenko <paulclinger@...>
Date: Mon Nov 19, 2001 6:09 pm
Subject: Re: Ticket authentication done on the server level before dispatch...
paulclinger
Send Email Send Email
 
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



#1007 From: "Kent Sandvik" <sandvik@...>
Date: Fri Nov 16, 2001 11:13 pm
Subject: Ticket authentication done on the server level before dispatch...
kent_sandvik
Send Email Send Email
 
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





 
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help