示例#1
0
 /**
  * Validate the wsse header
  *
  * @param Wsse &$wsse
  *
  */
 protected function vaidateHeaders(Wsse &$wsse)
 {
     $header = $wsse->getHeaders();
     $pattern = '/UsernameToken Username="******"]+)", PasswordDigest="([^"]+)", Nonce="([^"]+)", Created="([^"]+)"/';
     $this->assertRegExp($pattern, $header['X-WSSE'], 'Wsse header did not match pattern');
 }
示例#2
0
 /**
  * Get the WSSE authentication header
  *
  *
  * @return array
  */
 protected function getAuthenticationHeader()
 {
     $wsse = new Wsse($this->configuration->identifier, $this->configuration->secret);
     return $wsse->getHeaders();
 }