-
Notifications
You must be signed in to change notification settings - Fork 16
Quick Start
This document describes how to get a tiqr demo running on your system using the SimpleSAMLphp tiqr module. It is written for linux and osx. Other systems will probably need some modifications.
It is assumed you have a working php setup. Note that tiqr requires some php packages for interfacing to curl
and gd
, for example. On an Ubuntu 16.04 (Xenial Xerus) system, php can be installed with:
$ sudo apt install php php-zip php-sqlite3 php-dom php-curl php-gmp php-gd
Mac osx users can use HomeBrew to install for a particular version of php (php 5.6 for instance):
$ brew install php56 php56-gmp
Download and unpack the latest SimpleSAMLphp release from github. For example:
$ wget https://github.com/simplesamlphp/simplesamlphp/releases/download/v1.14.11/simplesamlphp-1.14.11.tar.gz
$ tar xzf simplesamlphp-1.14.11.tar.gz
$ cd simplesamlphp-1.14.11/
We will be running SimpleSAMLphp using PHP's built-in Web Server. The default configuration assumes the use of a virtual directory named simplesaml
, so we simulate one using a symbolic link:
$ ln -s . www/simplesaml
Now you can check if SimpleSAMLphp is installed by starting your Web Server:
$ php -S 0:8080 -t www
Open the URL http://localhost:8080 using a web browser.
Installing the tiqr module is easiest using composer, a dependency management tool for PHP. (Download)[https://getcomposer.org/download/] and install composer according to the instructions on the composer web site, or if you don't care about security, run:
$ curl -sS https://getcomposer.org/installer | php
Then install the tiqr module using:
$ ./composer.phar require tiqr/simplesamlphp-module-authtiqr
Activate the default tiqr configuration using
$ cp modules/authTiqr/config-templates/module_tiqr.php config/
Add a tiqr authentication source by editing the file config/authsources.php
and include the line
'authTiqr' => array('authTiqr:Tiqr'),
Start your web server using
$ php -S 0:8080 -t www
Note that we specify 0
as our IP address. This is important because the web server needs to listen on all interfaces so that your mobile phone's tiqr app can communicate with your web server. For this to work, also make sure nothing is blocking communication between your phone and your web server. Use a tool like ifconfig
to find out what IP address to use, for instance:
$ ifconfig en0 | grep inet
inet 192.0.2.1 netmask 0xffffff00 broadcast 192.0.2.255
So if your IP address is 192.0.2.1, point your browser to http://192.0.2.1:8080
Then, use the tiqr app on your Android phone to enrol a new account. Note that using an iOS device requires the use of https for enrolment due to Apple's App Transport Security.