Skip to content

PHP class file for integration pages in the AFAS InSIte content management system

Notifications You must be signed in to change notification settings

alphabase/AFASintegration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

AFAS InSite integration page class

This PHP class file enables you to quickly make an integration page with an AFAS InSite intranet website. By calling the PHP class and including the public and private key of the integration page, you can retrieve information about the user's session in the AFAS InSite website.

Creating a new integration page

Follow the hyperlinks below in order to create the new integration page in AFAS Profit:

Technical documentation

The AFAS KnowledgeBase includes detailed documentation on how to integrate external pages through an iFrame with AFAS InSite:

Externe pagina's integreren in InSite en OutSite

Usage

Use the following PHP source code to call and activate the PHP class.
<?php
// Include the PHP class file
include_once ('class.afasintegration.php');
// Prepare the configuration variable
$config = array (
		'public_key' => 'YOUR_PUBLIC_KEY_HERE',
		'private_key' => 'YOUR_PRIVATE_KEY_HERE',
		'validate_ssl' => false,
		'debug' => true
);
// Instantiate the PHP class file
$AFASintegration = new AFASintegration ( $_REQUEST, $config );
?>

After you have successfully called the PHP class including a valid public and private key combination, use the variable and code below to use the retrieved session information.

<?php var_dump($AFASintegration->data)?>

Variables

PHP source

  • public_key
    The public key has been provided by AFAS Profit and allows you to know which integration page has requested your script.
  • private_key
    The private key has been provided by AFAS Profit and allows you to verify that you are allowed to use the integration.
  • validate_ssl
    Whether or not you wish to validate the SSL certificate of the InSite URL.
  • debug
    Whether or not you wish to include performance indicators in the data variable of the PHP class.

Request

  • dataurl
    Alternate url to be used for an integration without public and private keys.
  • tokenurl
    The url to which we will be making a postback to confirm the originating InSite page that we have a valid private key in order to receive the integrated details.
  • code
    The originating InSite expects this unique code in the postback for verification and identification purposes.
  • publickey
    The public key has been provided by AFAS Profit and allows you to know which integration page has requested your script.
  • sessionid
    This session id originates from the actual InSite session of the user, and allows you to make sure that you are still dealing with the same InSite user throughout requests.

Result

  • environmentId
    The identifier of the AFAS Profit environment in which the InSite is hosted.
  • sessionId
    This session id originates from the actual InSite session of the user, and allows you to make sure that you are still dealing with the same InSite user throughout requests.
  • userId
    The username of the user which is logged in at InSite.
  • personCode
    The code of the registered person in AFAS Profit.
  • contactId
    The code of the registered contact in AFAS Profit.
  • organizationCode
    The code of the registered organization in AFAS Profit.
  • employeeId
    The code of the registered employee in AFAS Profit.
  • cssUrl
    Use the CSS-resource at this address to give your integrated page the same appearance as the originating InSite website.
  • scriptUrl
    Use the JavaScript-resource at this address to provide a complete integrated experience and allow for sizing-functionality.

About

PHP class file for integration pages in the AFAS InSIte content management system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages