API & Integration

API and integration guide

SSO Format

Forma.lms accepts SSO from a third-party site for the already registered users

Settings

The SSO functionality has to be enabled in the general settings.
You have to define a secret key that will have to be shared between forma.lms and the third-party portal or website implementing SSO.
We suggest you to use a long and complex secret key (at least 32 characters, including capitalized and not capitalized letter, numbers, symbols). You can generate a complex key with one of the many automatic token generators available on the web.

You can define the validity of the generated token. Default is 60 seconds. The link generated with the token is valid for the time set starting from when it has been generated.

forma.lms version 1.xx

http://.../appLms/index.php?login_user=<username>&time=<str_tempo>&token=<str_token>

forma.lms version 2.xx

http://.../index.php?r=adm/homepage/sso&login_user=<username>&time=<str_tempo>&token=<str_token>

This is the meaning of the parameters you can find in the link

<username> = this is the user name as registered in the LMS.

<str_tempo> = token generation date and time, in the timestamp format NNNNNNNNNN
(number of seconds since 1970)
<str_token> = encrypted string, with the following algorithm:

md5( <username> + ‘,’ + <str_tempo> + ‘,’ + <shared key> )

The generated token’s validity can be set under the LMS’s settings. By default, it’s 60 seconds.

Examples

Example 1

Shared key: parolachiavecondivisasso

Username (login): gverdi

Date and time of generation: 2017-11-20 09:13:42

URL parameters:

URL to be used

forma 1.x:

http://your.domain.com/appLms/index.php?login_user=gverdi&time=1511165622&token=d16ea692e74fdd9cbbbd2fb1001c33e1 

forma 2.x

http://your.domain.com/testing/index.php?r=adm/homepage/sso&login_user=gverdi&time=1511165622&token= d16ea692e74fdd9cbbbd2fb1001c33e1

Example 2

Shared key: ssosharedkeysample

Username (login): johndoe

Date and time of generation: 2017-11-20 09:21:31

URL parameters:

URL to be used

forma 1.x:

http://your.domain.com/appLms/index.php?login_user=johndoe&time=1511166091&token=48e430a787ba544894a092ea2480a244

forma 2.x:

http://your.domain.com/index.php?r=adm/homepage/sso&login_user=johndoe&time=1511166091&token=48e430a787ba544894a092ea2480a244

Forma Integration & Automation solutions

This article provides an overview of the main native solutions to integrate Forma LMS with external applications through different authentication and data exchange solutions

API

The “Application Programming Interface” is a set of procedures that programmers can use to interoperate with the application by adding/editing/deleting data from another application (i.e., to update user accounts information from an external HR software).

 Forma LMS is provided with an extensive set of API that will help developers interact con almost any part of the application.

Full Forma API Guide

SSO

This solution allow users logged to another system to seamlessly log in to Forma, without entering their password. SSO requires that a user with the same username is already present in Forma: the list of users must manually be preloaded in Forma, or synchronized via API or I/O task

The SSO can be activated and configured under

Main > Configuration > Settings > API & SSO

Learn More

LDAP Authentication

LDAP is a protocol allowing integration with Windows Active Directory services.

Forma LMS provides native support for LDAP authentication. LDAP user synchronization is not natively supported.

Check the Forma User Reference Guide for details

I/O Task

this feature allows the creation in Forma of scheduled data import/export operations in text/csv files. The exported files and the files to be imported are saved in the Forma filesystem. This feature is located in administration under:

Admin > Settings > System Configuration > I/O Tasks

Full Forma Connectors Guide

Report Scheduler

any report can be scheduled and sent in file format to some user email accounts. With some customization, the report file could be generated and stored on filesystem to be accessed by external applications. Tasks need to be launched via server chron/job.