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

on_dispatch

Expand Messages
  • Shao Ming
    Hi to all, I m trying to implment some simplistic authentication check using the un-documented function on_dispatch . Below is the part where I wrote my on
    Message 1 of 1 , Oct 13, 2003
    • 0 Attachment
       
      Hi to all,
       
      I'm trying to implment some simplistic authentication check using the un-documented function 'on_dispatch'.
      Below is the part where I wrote my on dispatch ...
       
          -> on_dispatch(
              sub {
                  my $env = shift;
                  my $header = $env->valueof('//authInfo');
                  if($header eq 'certain auth criteria') {
                      return; # if everything is ok and we want to use default dispatch
                  } else {
                      return 'Auth', 'invalidSession'; # URI, method
                  }
              })
      I'm having problem with the 'else' part. When the authentication info is invalid, I trynig to re-direct to the 'invalidSession' method at 'Auth' module. However, I'm getting the error below.
       
      SOAPAction shall match 'uri#method' if present (got 'Auth#getUsrInfo', expected 'Auth#invalidSession'
      Any idea what is the above all about? Am I missing certain syntax somewhere?
       
      thanks for your attention
       
      /shaoming
    Your message has been successfully submitted and would be delivered to recipients shortly.