Login Callback API

The Login Callback API is a feature to inform an external system of a successful login of any user at the PowerFolder Server. It's possible to let PowerFolder Server call an URL or a batch script/executable when an user authenticates at the PowerFolder Server via client or web. Certain parameters like the username are passed to the called script/URL defined.

Overview:

Using the Login Callback API

To setup a callback URL/script please insert the following line into the PowerFolder Server Configuration File:

login.script=http://example.com/process_login.php

or

login.script=C:\\scripts\\process_login.bat

(warning) Double slashes (\\) are required to encode the single slash path separator (\) on Windows operating systems.

Calling an URL when a user logs in

If the script begins with a "http" a simple HTTP (GET) request is executed against the given URL. The following parameters are passed to the URL:

ParameterDescriptionExample
actionCurrently always "login"login
UsernameThe username of the accountuser@example.com
OIDThe internal ID of the account in database1CEC6CABA78049428FAD278FED1FCEED
firstLoginIf this is the first login of this user at the serverfalse


Example

https://powerfolder.example.com/process_login.php?action=login&Username=user@example.com&OID=1CEC6CABA78049428FAD278FED1FCEED&firstLogin=false

Calling a script when a user logs in

The script will be executed after a successful login of a user. These parameters are passed to the script in the following order: action, Username, OID and firstLogin


Example

C:\scripts\process_login.bat login user@example.com 1CEC6CABA78049428FAD278FED1FCEED false

Â