/[volute]/trunk/projects/grid/vospace/php_endpoint/vospace_service.php
ViewVC logotype

Diff of /trunk/projects/grid/vospace/php_endpoint/vospace_service.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 736 by richard.p.wagner, Wed Aug 20 00:20:45 2008 UTC revision 737 by richard.p.wagner, Thu Aug 21 19:31:18 2008 UTC
# Line 14  Line 14 
14      return $views;      return $views;
15    }    }
16    
17    function GetProtocols($message){    function GetProtocols($message){    
18      $vospace = new VOSpace();      $vospace = new VOSpace();
19      $protocols = $vospace->getProtocols();      $protocols = $vospace->getProtocols();
20      return $protocols;      return $protocols;
# Line 143  Line 143 
143                            "InternalFault");                            "InternalFault");
144    }    }
145    
146      function Security( $foo ){
147    
148        $p = xml_parser_create();
149        xml_parse_into_struct($p, $foo->any, $vals, $index);
150        xml_parser_free($p);
151    //     error_log(var_export($vals, True), 3, "/var/tmp/vospace.err.log");
152    //     error_log(var_export($index, True), 3, "/var/tmp/vospace.err.log");
153    
154        $username = '';
155        $password = '';
156        foreach( $vals as $element){
157          if( strpos($element['tag'],  "USERNAMETOKEN") === FALSE ){
158            if( strpos($element['tag'],  "USERNAME") !== FALSE )
159              $username = $element['value'];
160            if( strpos($element['tag'],  "PASSWORD") !== FALSE )
161              $password = $element['value'];
162          }
163        }
164        error_log(var_export($username, True), 3, "/var/tmp/vospace.err.log");
165        error_log(var_export($password, True), 3, "/var/tmp/vospace.err.log");
166    
167        if( $username == 'joe' && $password == 'doe' ){
168          $this->Authenticated = True;
169        } else {
170          $this->Authenticated = False;
171           throw new SoapFault("Server", "Not authenticated.", " ",
172                               array(),
173                               "PermissionDeniedFault");
174          
175        }
176      }
177  }  }
178    
179  ?>  ?>

Legend:
Removed from v.736  
changed lines
  Added in v.737

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26