<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Passing IIS Windows Authentication details from PHP login page to secured services in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192374#M17764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a PHP login page (in front of a map application) using Windows Authentication through IIS 7.5, and Active Directory manages the allowed users and their credentials. This login page starts a PHP Session to unlock all subsequent secure sites. However our web services need to be secured through our ArcGIS Server, so as users move onward they will be challenged for credentials again by the ArcGIS Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a newb and stuck at how the 'Negotiate' authentication from IIS (on the PHP site) can be used to also unlock the 'Web Tier' authentication on the ArcGIS Server so that users only enter their credentials once on the initial login page. This will be necessary for users not on the intranet. Is it possible? Maybe I should use this approach: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/80098-hard-code-token-based-on-referrer?highlight=php+login" rel="nofollow" target="_blank"&gt;hard code token&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Thanks for any thoughts!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 16:47:10 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-04-23T16:47:10Z</dc:date>
    <item>
      <title>Passing IIS Windows Authentication details from PHP login page to secured services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192374#M17764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a PHP login page (in front of a map application) using Windows Authentication through IIS 7.5, and Active Directory manages the allowed users and their credentials. This login page starts a PHP Session to unlock all subsequent secure sites. However our web services need to be secured through our ArcGIS Server, so as users move onward they will be challenged for credentials again by the ArcGIS Server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a newb and stuck at how the 'Negotiate' authentication from IIS (on the PHP site) can be used to also unlock the 'Web Tier' authentication on the ArcGIS Server so that users only enter their credentials once on the initial login page. This will be necessary for users not on the intranet. Is it possible? Maybe I should use this approach: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/80098-hard-code-token-based-on-referrer?highlight=php+login" rel="nofollow" target="_blank"&gt;hard code token&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Thanks for any thoughts!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 16:47:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192374#M17764</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-23T16:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192375#M17765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you have any code for this as of yet?? If you do please post. I am an experience PHP coder and should be able to help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*EDIT*&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try taking a look here&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/enable-php-applications-to-make-application-level-access-control-decisions"&gt;http://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/enable-php-applications-to-make-application-level-access-control-decisions&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 11:52:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192375#M17765</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-24T11:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192376#M17766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is the login page. I am stuck at where to capture login information that IIS passes back during Windows Authentication:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
 &amp;lt;head&amp;gt;
&amp;nbsp; &amp;lt;title&amp;gt;Secure Access&amp;lt;/title&amp;gt;
 &amp;lt;/head&amp;gt;

 &amp;lt;body&amp;gt;
&amp;nbsp; &amp;lt;?php
&amp;nbsp; // Start session to track this users identity
&amp;nbsp; session_start();
&amp;nbsp; // Make sure they aren't already in a session; if so, redirect to GIS Home
&amp;nbsp; // IWP_loggedIn is boolean, 'true'; if there is a session, credentials are already stored
&amp;nbsp; if ($_SESSION['IWP_loggedIn']) {
&amp;nbsp;&amp;nbsp; // Redirect to the secure content (ArcGIS JavaScript app with secured ArcGIS Server services)
&amp;nbsp;&amp;nbsp; // header("Location: http://example.com/gis.php");
&amp;nbsp;&amp;nbsp; // TEST MODE: print the authorized user name
&amp;nbsp;&amp;nbsp; echo $_SERVER['LOGON_USER'];
&amp;nbsp;&amp;nbsp; // Make sure that code below does not get executed when we redirect
&amp;nbsp;&amp;nbsp; exit();

&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp; // If no session is started and no authentication has been performed
&amp;nbsp;&amp;nbsp; if (empty($_SERVER["LOGON_USER"])) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; // If user is not in intranet, or browser is not enabled for SSO
&amp;nbsp;&amp;nbsp;&amp;nbsp; // IIS/browser prompt for credentials; this message is a stand-in for now
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "&amp;lt;h1&amp;gt;Please login with your credentials to access GIS data&amp;lt;/h1&amp;gt;";
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create session logged-in variable to track user
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION['IWP_loggedIn'] = TRUE;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Store credentials (how do I pass on username/password or key to the next site?)
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION["IWPUser"] = $_SERVER["LOGON_USER"];
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Redirect, credentials passed via PHP session
&amp;nbsp;&amp;nbsp;&amp;nbsp; // header("Location: http://example.com/gis.php");
&amp;nbsp;&amp;nbsp;&amp;nbsp; // TEST MODE: print the authorized user name
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $_SERVER['LOGON_USER'];
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Make sure that code below does not get executed when we redirect
&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp; // If user is on intranet and browser is enabled for SSO, automatic login occurs
&amp;nbsp;&amp;nbsp; // "LOGON USER" field will be filled, auto-redirect to map
&amp;nbsp;&amp;nbsp; if (!empty($_SERVER["LOGON_USER"])) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "Oh Joy!!!";
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Create session logged-in variable to track user
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION['IWP_loggedIn'] = TRUE;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Store credentials (how do I pass on username/password or key to the next site?)
&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION["IWPUser"] = $_SERVER["LOGON_USER"];
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Redirect, credentials passed via PHP session
&amp;nbsp;&amp;nbsp;&amp;nbsp; // header("Location: http://example.com/gis.php");
&amp;nbsp;&amp;nbsp;&amp;nbsp; // TEST MODE: print the authorized user name
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $_SERVER['LOGON_USER'];
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Make sure that code below does not get executed when we redirect
&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&amp;nbsp; ?&amp;gt;
 &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:40:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192376#M17766</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T09:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192377#M17767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is the PHP snippet in front of each JavaScript app with secured services. This code is to prevent users from directly typing in the app url and getting to the map instead of going through the login page. I need to add in an authentication part.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;?php
// Start session to track this users identity
session_start();
// Make sure they are logged in, if not redirect to login
// IWP_loggedIn is boolean, 'true'
if (!$_SESSION['IWP_loggedIn']) {
 // Redirect to the secure content
 header("Location: http://example.com/login.php");
 // Make sure that code below does not get executed when we redirect
 exit();
}
else {
 //talk to ArcGIS Server/Web Adaptor to tell it the users credentials
}
?&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192377#M17767</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T09:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192378#M17768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Raymond the link you provided as been very helpful, I think I need to be looking into Forms Authentication (not Windows)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Apr 2014 15:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192378#M17768</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-24T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192379#M17769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We don't use a windows domain here but after some reading it seems the best solution is to use ldap. PHP requires you just un-comment the ldap.dll in php.ini and ldap is on by default in active directory. That being said I would put my functions in a separate file so that they may be used throughout your application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;functions.php&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;function login_check()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (isset($_SESSION['IWP_loggedIn']) &amp;amp;&amp;amp; $_SESSION['IWP_loggedIn'] === true &amp;amp;&amp;amp; isset($_SESSION["IWPUser"])) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function do_login($username, $password, $redirect)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; $un = $username; // This may need to change. you may have to append the domain ie. mydomain\username&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; $pw = $password;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if(empty($un)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("Location: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://example.com/login.php?error=Username" rel="nofollow" target="_blank"&gt;http://example.com/login.php?error=Username&lt;/A&gt;&lt;SPAN&gt; cannot be blank");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if(empty($pw)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("Location: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://example.com/login.php?error=Username" rel="nofollow" target="_blank"&gt;http://example.com/login.php?error=Username&lt;/A&gt;&lt;SPAN&gt; cannot be blank");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; $server = "ldaps://yourservernamehere"; //IP or name of server here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; //echo $server;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (!($ldap = ldap_connect($server))) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("Location: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://example.com/login.php?error=Could" rel="nofollow" target="_blank"&gt;http://example.com/login.php?error=Could&lt;/A&gt;&lt;SPAN&gt; Not Connect To Server"); // can change these error messages&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (!ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("Location: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://example.com/login.php?error=Could" rel="nofollow" target="_blank"&gt;http://example.com/login.php?error=Could&lt;/A&gt;&lt;SPAN&gt; Not Connect To Server");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (!($res = @ldap_bind($ldap, $un, $pw))) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("Location: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://example.com/login.php?error=Could" rel="nofollow" target="_blank"&gt;http://example.com/login.php?error=Could&lt;/A&gt;&lt;SPAN&gt; Not Connect To Server");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION['IWP_loggedIn'] = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $_SESSION["IWPUser"] = $username;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; header("Location: ".$redirect);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function do_logout($redirect)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; session_destroy();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; header("Location: ".$redirect);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;now you can require this file at the top of all your pages so that the functions can be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;login.php&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]&amp;lt;?php&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; $error = isset($_GET['error']) ? $_GET['error'] : "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;?&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;style type="text/css"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Login Form style&amp;nbsp; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#loginform {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; font-size: 14px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; text-align: center;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; width: 480px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; position: fixed;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; /*display: none;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; background-color: #EEEEEE;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border-radius: 13px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border: 2px solid #3399CC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; top: 40%;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; left: 36%;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; z-index: 200;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; box-shadow: 10px 10px 10px black;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#loginform .form_header&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border-top-left-radius: 10px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border-top-right-radius: 10px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border-bottom: none;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; width: 480px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; height: 30px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; line-height: 19px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; vertical-align: middle;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; background-color: #3399CC;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; text-decoration: none;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; font-family: Times New Roman, Serif;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; font-weight: 900;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; font-size:&amp;nbsp; 18px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; text-align: left;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; padding-top: 5px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; color:&amp;nbsp;&amp;nbsp; #FFFFFF;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; cursor:&amp;nbsp; default;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#loginform .form_body&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; width: 400px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border: 1px solid black;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; background-color: #FFFFFF;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#loginform .status&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; width: 400px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; margin: 10px auto 0 auto;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#loginform input {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; margin: 5px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; padding: 0px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; float: left;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border: 1px solid #cdcdcd;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; background-color: white;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; border-radius: 2px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* 'Login' Button */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#submit {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; margin: 5px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; padding: 0px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; float: left;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; width: 50px;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; background-color: white;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/style&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;div id="loginform" style="" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;div class="form_header" id="popup_drag" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;span style="margin-left:5px;"&amp;gt;Employee Login&amp;lt;/span&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;div class="status"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fieldset&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;legend align="center"&amp;gt;Authentication&amp;lt;/legend&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id="login" name="login" method="post" action="/do_login.php" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type="hidden" name="redirect" value="/gis"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;table align="center" width="300" border="0"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td width="80"&amp;gt;Username&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id="name" type="text" name="username"&amp;gt;&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;Password&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input type="password" name="password"&amp;gt;&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;nbsp;&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;input id="submit" class="login-submit" type="submit" name="submit" value="Login"&amp;gt;&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fieldset&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;&amp;lt;span style="color:red;"&amp;gt;&amp;lt;?php echo $error;?&amp;gt;&amp;lt;/span&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/div&amp;gt;[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;do_login.php&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;session_start();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;require('functions.php');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Process login&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$postdata = $_POST;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;do_login($postdata['username'], $postadat['password'], $postdata['redirect']);[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Very simple. You can add in some messages if you like.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then at the top of all your pages just run a login check&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]session_start();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;require('functions.php');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(login_check() === false)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; header("Location: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://example.com/login.php" rel="nofollow" target="_blank"&gt;http://example.com/login.php&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; exit();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// rest of your page below&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not tested every part of this but once you implement it you can post any errors here and I will help out best I can.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget to start all your pages with session_start(); just incase I forgot to add it to any of the pages. Also remember to change all your header locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that gets you going.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 13:16:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192379#M17769</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-25T13:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192380#M17770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ray that's great, I really appreciate it. I might use this and skip trying to auto-authenticate via Windows, just to simplify. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The login is working but I'm having trouble carrying the session variables over. When I put the PHP code in front of a protected website to run the 'login_check' function, I am able to log in (login.php) and get redirected back to the page but the $_SESSION is empty (it's failing at 'login_check' function), and I am then routed back to login again. I put 'session_start()" at the top of every page now, but its not seeming to store it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 18:02:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192380#M17770</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-28T18:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192381#M17771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if you copied and pasted everything but looking through my code I made a typo. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;do_login.php&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]session_start();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;require('functions.php');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Process login&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$postdata = $_POST;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;do_login($postdata['username'], $postdata['password'], $postdata['redirect']);[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This actually sends you in a loop because you would never get authenticated so the session is never set and you end up on the login page forever.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 18:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192381#M17771</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-28T18:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192382#M17772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Also you do not need to put session_start() at the top of the functions.php page. since this is a required page the session has already been started by the parent page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 18:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192382#M17772</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-28T18:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192383#M17773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I did catch that typo. I don't see the problem...If I don't redirect and just echo out the $_SESSION["IWPUser"] at the end of the login function, it shows up fine. As soon as I try to pass it to another page it disappears.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 18:46:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192383#M17773</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-28T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192384#M17774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Very weird. There is no need to pass session variables to other pages. As long as the session has been started you should be able to view them simply by calling them. can you post a bit of your code so I can take a look?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 18:50:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192384#M17774</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-28T18:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192385#M17775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just remembered another thing. You should make sure the path to the session data is writable by the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To find out the path you can run the phpinfo() function. A short ways down should be a section which looks like the image attached. go to the path and make sure the IUSR account has write access. Also since you will be using a php form and ldap to authenticate you should shut off windows authentication in the web server and use anonymous authentication.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can change these values in the php.ini file. Don't forget to restart IIS to have them take effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 19:02:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192385#M17775</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-28T19:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192386#M17776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;functions.php (this version stops and prints out the username if login is successful):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;?php
function login_check() {

 if (isset($_SESSION['IWP_loggedIn']) &amp;amp;&amp;amp; $_SESSION['IWP_loggedIn'] === true &amp;amp;&amp;amp; isset($_SESSION["IWPUser"])) {
&amp;nbsp; return true;
 } else {
&amp;nbsp; return false;
 }
}

function do_login($username, $password, $redirect) {

 $un = 'DOMAIN\\' . $username;
 // Needs the domain ie. mydomain\username
 $pw = $password;
 if (empty($un)) {
&amp;nbsp; header("Location: http://example.com/sandboxPHP/login.php?error=Username cannot be blank");
&amp;nbsp; exit();
 }
 if (empty($pw)) {
&amp;nbsp; header("Location: http://example.com/sandboxPHP/login.php?error=Password cannot be blank");
&amp;nbsp; exit();
 }
 $server = "example.com";
 //IP or name of server here
 if (!($ldap = ldap_connect($server))) {
&amp;nbsp; header("Location: http://example.com/sandboxPHP/login.php?error=Could Not Connect To Server");
&amp;nbsp; // can change these error messages
&amp;nbsp; exit();
 }
 if (!ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3)) {
&amp;nbsp; header("Location: http://example.com/sandboxPHP/login.php?error=Protocol Error with LDAP");
&amp;nbsp; exit();
 }
 if (!($res = @ldap_bind($ldap, $un, $pw))) {
&amp;nbsp; header("Location: http://example.com/sandboxPHP/login.php?error=Bind Error with LDAP");
&amp;nbsp; exit();
 } else {
&amp;nbsp; $_SESSION["IWP_loggedIn"] = true;
&amp;nbsp; $_SESSION["IWPUser"] = $un;
&amp;nbsp; // Make sure to use appended username with Domain
&amp;nbsp; echo $_SESSION["IWPUser"];
&amp;nbsp; //header("Location: " . $redirect);
 }
}

function do_logout($redirect) {
 session_destroy();
 header("Location: " . $redirect);
}
?&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code before protected page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;?php 
session_start(); 
echo $_SESSION["IWPUser"];

require('functions.php'); 
if(login_check() === false) 
{
echo 'issue'; 
 
&amp;nbsp; //header("Location: "); 
&amp;nbsp; exit(); 
} else { 
// rest of your page below 
}&amp;nbsp; ?&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192386#M17776</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T09:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192387#M17777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Folder permissions seem fine. The only way I got it to work was to give a session_id in the 'do_login.php' page, and then when I open a protected page call the session_id before starting the session. Otherwise, the protected page starts a new session, rather than resuming/continuing the session from previous pages. I have no idea what I have done to cause this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* And yes, I have it set to anonymous&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 21:37:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192387#M17777</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-04-28T21:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192388#M17778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Add this to the top of your pages and see what you get.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]ini_set ("display_errors", "1");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;error_reporting(E_ALL);[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;let me know if any error show.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 11:16:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192388#M17778</guid>
      <dc:creator>RaymondGoins</dc:creator>
      <dc:date>2014-04-29T11:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Passing IIS Windows Authentication details from PHP login page to secured service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192389#M17779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry for the delay - no warning messages. I made a test redirecting between two basically blank pages, and it seems the issue was a setting in my php.ini file regarding cookies. Last night before leaving work I made some changes, and this morning the sessions are remaining open between header redirects. I think I had it set to not use cookies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;***&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;edit: Yes, apologies if this is a PHP no-brainer but specifically if in php.ini file 'session.use_cookies = 0', then the session is not saved between page redirects (Chrome, IIS 7.5)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 May 2014 14:53:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/passing-iis-windows-authentication-details-from/m-p/192389#M17779</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-05-09T14:53:03Z</dc:date>
    </item>
  </channel>
</rss>

