Find Jobs
Hire Freelancers

X-WSSE AUTHENTICATION (JUST THE SERVER PAGE, THE CLIENT IS MINE)

€10-50 EUR

In Progress
Posted over 8 years ago

€10-50 EUR

Paid on delivery
Hello, I'm in trouble with WSSE Authentication in PHP. I found a good client and server file for my tests and works fine, but I receive the call in other way, so I must configure my serverside for receiving the right header with username, psw, nonce and created time. The call: <?php class TokenGenerator { public static function generateToken($username, $password) { $nonce = self::generateNonce (); $created = date ( 'Y-m-d\TH:i:sP' ); $digest = base64_encode ( sha1 ( $nonce . $created . $password, TRUE ) ); $token = sprintf ( 'UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"', $username, $digest, $nonce, $created ); return $token; } private static function generateNonce($bits = 256) { $bytes = ceil ( $bits / 8 ) * microtime (); $return = ''; for($i = 0; $i < $bytes; $i ++) $return .= chr ( mt_rand ( 0, 255 ) ); return md5 ( $return ); } } $xwsse = TokenGenerator::generateToken ( 'username', 'RC&EWoiQ7#!!' ); // ### GENERO IL TOKEN $httpRequest = new \HttpRequest ( 'http://XXXX/', \HttpRequest::METH_POST, [ 'headers' => [ 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8', 'Accept-Charset' => 'UTF-8', 'X-Wsse' => $xwsse ], 'protocol' => HTTP_VERSION_1_2 ] ); $httpRequest->setPostFields ( [ 'userName' => 'testAgentnip', 'phoneNumber' => '3474875366', 'customer' => '112233' ] ) or die ( 'Errore' ); try { $result = $httpRequest->send()->getBody (); echo $result; } catch ( \HttpException $ex ) { error_log ( 'ERRORE CHIAMATA HTTP => ' . $ex->getMessage () ); } Now I need a page which receive this kind of header. I've been looking for getallheaders() function, but still doesn't work
Project ID: 9167425

About the project

1 proposal
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Dear Sir, Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I have checked your requirements.i have right skills to work on this assignment my award = superb result = happy client. In a good partnership, good results happen. Good cooking makes good eating!BWe consider our client as our partner. can u provide your email or sky-pe etc for further discussion about the project. I am ready to discuss with you with best Regards
€33 EUR in 3 days
0.0 (2 reviews)
0.0
0.0
1 freelancer is bidding on average €33 EUR for this job
User Avatar
A proposal has not yet been provided
€526 EUR in 3 days
4.0 (7 reviews)
3.9
3.9

About the client

Flag of ITALY
Pomezia, Italy
5.0
1
Payment method verified
Member since Nov 18, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.