Login callback API

From PowerFolder Wiki
Jump to: navigation, search

Contents

Preface

The login callback or login 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 call an URL or a batch script/executable when an user authenticates at the PowerFolder Server (via client or web). Certain parameters like Username are passed to the called script/URL.

Setup

To setup a callback URL/script please insert the following line into the server's configuration file:

login.script=http://myserver/process_login.php

or

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

Note: Double slashes (\\) are required to encode the single slash path separator (\) under Windows.

HTTP / URL callback

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

Parameter Description Example
action Currently always "login" login
Username The username of the account myaccount@example.com
OID The internal ID of the account in database 1CEC6CABA78049428FAD278FED1FCEED
firstLogin If this is the first login of this user at the server false


Example

http://myserver/process_login.php?action=login&Username=myaccount@example.com&OID=1CEC6CABA78049428FAD278FED1FCEED&firstLogin=false

Script/Executable callback

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@myserver.com 1CEC6CABA78049428FAD278FED1FCEED false

Related documentation

Personal tools
Navigation