Autologin feature used for personal user pages.
How it works
- User types his login and password and presses login button on web-page.
- User watches his personal page.
- Javascript phone initialization starts after the page has been loaded.
- Javascript phone uses token parameter and send this parameter to Flashphoner-server.
- Flashphoner server requests third-party authentication server by HTTP.
- Third-party authentication server returns XML with login details.
- Flashphoner-server uses this details for registration of SIP account.
How to try autologin
- Make sure that Javascript phone works for you using stadard login scheme.
- Insert such tag into HTML page, where Javascript phone loaded:
PhoneJS.html
<input id="auto_login_token" type="hidden" value="123456789abcdef" />
Here we have added element with id=token and value=123456789abcdef
Javascript phone will use this element for autologin process
- Edit server-side properties file and set third-party authentication server here:
flashphoner-client.properties
auto_login_url=flashphoner.com/my_auto_login_url.xml
You should specify your own auto login URL here.
Flashphoner will send such GET request to that url:http:///.../.../...?token=...?swfUrl=...?pageUrl=...
- Restart Flashphoner server to apply the changes.See also Configuring section
- Create authentication XML document and upload this document into web-server.
The web-server will be used as third-party authentication server for tests.
Your document should look like this:my_auto_login_url.xml<root registered="..." login="..." authenticationName="..." password="..." outboundProxy="..." domain="..." port="..." visibleName="..."/>
* Please note - format was changed from flashphoner client v.1.0.193. Click to expand and check old format
Here:Field Description registered
authTrue if you permit access for this token login
sip_loginName of your SIP account authenticationName Authentication name for your SIP account password
sip_passwordPassword for your SIP account domain
sip_serverIP address or domain name of your SIP server outboundProxy IP address or domain name of your outbound proxy port Port for SIP signaling connect (usually 5060) visibleName Visible name of your SIP account Open this document in the browser and make sure it contains correct credentials.
Sure, you can use PHP or any server-side script to generate XML dynamically,
Your url will loks like this in that caseauto_login_url=http://flashphoner.com/my_auto_login_url.php - Uncomment strings in file js/flashLoader.js
$(function() {$(function() { flashvars.token = $("#auto_login_token").val(); }); - Refresh browser cache and try to open the HTML page with Javascript phone again.
It should use autologin and you should be success logged with credentials, which described in the XML document.
Try to make call.
FAQ
How to structure that XML file for multiple SIP users?