Small Back-End application to manage private users from libraries who access online resources with their SWITCH edu-id.
Information about the Pura Project
For more information, feel free to contact us at [email protected].
Url :
- https://pura.swissbib.ch (user management by librarians)
- https://www.swissbib.ch/MyResearch/Pura (registration for end-users)
Repositories :
- https://github.com/swissbib/pura-backend (user management by librarians)
- https://github.com/swissbib/vufind (registration for end users, module Swissbib, service Pura)
- https://github.com/swissbib/switchSharedAttributesAPIClient (communication with switch api)
Public documentation : http://www.swissbib.org/wiki/index.php?title=Private_User_Remote_Access_(Pura)
Pura-Back-End uses two mysql databases :
- the main one is pura-db
- the second one is puralogin which takes care of username and passwords for the authentication on pura-back-end
You can see the schemas in the sql folder of this repository.
Here are the instructions to install the pura back-end. They have been tested on Ubuntu 18.04.
Clone repo
git clone [email protected]:swissbib/pura-backend.git
Create the 2 Databases based on the schemas in the sql directory.
Adapt the configuration to use the correct databases :
cd config/autoload
cp development.local.php.dist development.local.php
In development.local.php, update :
- databases info (multiple places)
- credentials for the SWITCH API
Install dependencies
composer install
Run with php development server
php -S 0.0.0.0:8080 -t public/ public/index.php
And go to http://localhost:8080
To enable Pura for a new library (let's say it has library code A999) :
Add a user for pura-back-end :
Use PHP interactive mode :
php -a
To encrypt the 'new_password_to_encrypt'
> echo password_hash('new_password_to_encrypt', PASSWORD_BCRYPT);
> $21ruoigdyfhngfkjjThisIsTheEncryptedPassword
In the database
sudo mysql
use puralogin;
INSERT INTO `users` VALUES ('puraA999','$21ruoigdyfhngfkjjThisIsTheEncryptedPassword','A999');