Floor Plan Mapper iframe Authenticator Configuration Guide
Setup
Python environment:
- Install Python (3.9+) using the installer found on the Python webpage.
- Browse to the Python installation folder and ensure both the “IUSR” and “IIS_IUSRS” have full control.
- Open a command prompt as Administrator

- Install dependencies: pip install Flask flask-cors requests

IIS (Internet Information Service)
- Install the IIS extension: https://www.iis.net/downloads/microsoft/httpplatformhandler
- Enable ASP.NET to make the extension work.

- Place the FPM IA files on your server in a new folder. This new folder will be published as a web folder (eg c:\inetpub\wwwroot\internalFPMURL)
- Create a new site in IIS (cmd prompt –> inetmgr) and set the path to the folder from the previous step. (Warning! This site should be available in your Internal Network and unavailable from the Internet).


- Edit the FPM IA file named web.config; replace C:\Python311\python.exe with the correct Python path on your server.
- Try to open it. If you see the message FPM Intranet Authenticator is working, everything is set up correctly.
Credentials
- Create a new FPM user for your workspace (we recommend creating a new user for this purpose, but you can use an existing one).

- Replace the default credentials user@example.com, my_strong_password in the FPM IA app.py file with the created user’s credentials.
Intranet Integration to your portal
- Add an iframe on your portal with src: https://fpm.cloud/login-intranet?endpoint=%YOUR_SITE_HERE%/get-token. Example: https://fpm.cloud/login-intranet?endpoint=https://my-intranet-domain.local/get-token.
That’s it. Now your users can get access to fpm.cloud through a shared account.
App.py
from flask import Flask, request, jsonify
import requests
from flask_cors import CORS
def create_app():
app = Flask(__name__)
# Configuration for the additional payload
app.config['CREDENTIALS'] = {
'email': 'user@example.com',
'password': 'my_strong_password'
}
@app.route('/')
def hello_world():
return '<p>FPM Intranet Authenticator is working</p>'
@app.route('/get-token', methods=['GET'])
def process_query():
payload = app.config['CREDENTIALS']
response = requests.post('https://fpm.cloud/api/v1/auth/login',
json=payload)
return jsonify(response.json())
CORS(app, resources={
r"/get-token": {"origins": [
"https://fpm.cloud",
"http://fpm.cloud",
"http://*.fpm.cloud",
"https://*.fpm.cloud"
]}
})
return app
web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*"
modules="httpPlatformHandler" resourceType="Unspecified"
requireAccess="Script" />
</handlers>
<httpPlatform
stdoutLogEnabled="false"
stdoutLogFile=".\python.log"
startupTimeLimit="20"
processPath="C:\Python311\python.exe"
arguments="-m flask run --port %HTTP_PLATFORM_PORT%"
></httpPlatform>
</system.webServer>
</configuration>
Note: Matching SSL certs are required in each machine
