Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a cookie with a web service call
    primarykey
    data
    text
    <p>I have a PHP Web site which makes a Soap call to a .NET web service that runs on the same server as a .NET based web app which in addition to functioning as a Web app by itself also provides some information from its database to the the PHP site. The PHP/Wordpress site is an information portal + a bunch of static PDF documents on a landing page that lives behind a login and it is hosted on a different server to the .NET web app. A typical user authenticates using a login form on the PHP site, which then makes a Web service call(the Web method is given below) to the server that hosts the .NET app and the web service. Based on the result of the Web service call the user is granted access to the landing page that contain links to the static documents. Here is where the tricky part is. In addition to links to the static docs, the page also has a link to the Web app which authenticates the user. Long story short, the authentication for both the landing page and the Web app is done against the database that is used by the Web app. So I want to have a feature that when a user authenticates himself at the PHP site to view the PDFs and then clicks on the link to the .NET web app he should not have to re authenticate himself on this server to get into this site.</p> <p>Here is the code fragment that authenticates a user.</p> <pre><code>public string Login(string username, string password) { LoginUser user = LoginUserRepository.GetUserByUsername(username); if (user.Password.Equals(password)) { return "success"+" "+user.Role; } else { return "Wrong Password"; } } </code></pre> <p>The php file that calls this Web service then creates a session for the user for the PHP site. In the above code fragment, is there a way to create a cookie so that the user does not have to authenticate himself again to visit the pages within the .NET web app</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload