php - How to get a user authenticated token in sitefinity -


i want call sitefinity web service: users.svc/authenticate. running local instance of sitefinity web site, , running local php website (using wamp). when call web service through php file, 401 (unauthorized) error. think there 1 of 2 problems.

1.my syntax wrong. of analysis purposes:

$servicestring = "http://localhost:60876/sitefinity/services/security/users.svc/authenticate/"; $provider = array( "membershipprovider" => "", "password" => "password", "persistent" => true, "username" => "admin" ); $fp = fopen("test.txt", 'w'); $curl = curl_init($servicestring); curl_setopt($curl, curlopt_file, $fp); curl_setopt($curl, curlopt_postfields, $provider); if(!$curl_response = curl_exec($curl)) { trigger_error(curl_error($curl)); } curl_close($curl); fclose($fp); 

2. going process wrong. have come conclusion may need create kind of custom web service within sitefinity project, create token, , pass out php site. i'm hoping isn't case, because seems harder, if is, @ least know start over. also, if knows this, please tell me can start.

check out @timw255 need authenticate php

https://github.com/timw255/sitefinitysts-php


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -