https://github.com/digirati-co-uk/iiif-auth-server
Demo server implementation of IIIF Auth
https://github.com/digirati-co-uk/iiif-auth-server
iiif
Last synced: 19 days ago
JSON representation
Demo server implementation of IIIF Auth
- Host: GitHub
- URL: https://github.com/digirati-co-uk/iiif-auth-server
- Owner: digirati-co-uk
- License: gpl-3.0
- Created: 2017-03-25T15:58:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-04T01:55:49.000Z (almost 2 years ago)
- Last Synced: 2024-12-06T19:10:04.453Z (5 months ago)
- Topics: iiif
- Language: Python
- Homepage: https://iiifauth.digtest.co.uk/
- Size: 45.5 MB
- Stars: 9
- Watchers: 3
- Forks: 7
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - digirati-co-uk/iiif-auth-server - Demo server implementation of IIIF Auth (others)
README
# iiif-auth-server
A demo server implementation of all apsects of the [IIIF Authentication specification](http://iiif.io/api/auth/1.0/). It shows:
* The Login interaction pattern
* The Clickthrough interaction pattern
* The Kiosk interaction pattern
* The External interaction pattern
* "All or nothing" and degraded image access
* Token and Cookie servicesThis is a work in progress, please raise issues! It is intended to assist client development by providing a live implementation to test against.
It uses https://github.com/rogerhoward/iiify as base simple server. It's a Flask app that uses Pillow via [iiif2](https://github.com/mekarpeles/iiif2) to generate image tiles. `iiif-auth-server` adds an IIIF auth implementation to demonstrate the different interaction patterns, the cookie services, and the token service.
The latest version of this application should be running at [https://iiifauth.digtest.co.uk/](https://iiifauth.digtest.co.uk/).
There is an accompanying JavaScript client application to run against the server demo at [https://github.com/digirati-co-uk/iiif-auth-client](https://github.com/digirati-co-uk/iiif-auth-client).
This is not a production application! A typical institutional implementation would likely protect many thousands of images with the same cookie and token services, whereas this demo makes you authenticate for most of the sample images separately. It also gives access to everyone's session for diagnostic purposes, has one hardcoded username and password for Login pattern cookie services, and so on. However, it should exercise every part of the specification.
## Usage
1. Clone this repo
2. (optional) In the iiif-auth-server directory, set up a virtualenv:
```
python3 -m venv venv
```
3. To install for development:
```
pip install --editable .
```
4. to run for development:
```
export FLASK_APP=iiifauth
export FLASK_DEBUG=true
flask run
```
or
```
. runflask.sh
```5. Token information is stored in a sqllite3 db, which needs to be initialised:
```
flask initdb
```Problems - you will need to install jpeg support for pillow if you don't already have it, e.g., on Ubuntu
```
# install libjpeg-dev with apt
sudo apt-get install libjpeg-dev
# if you're on Ubuntu 14.04, also install this
sudo apt-get install libjpeg8-dev# reinstall pillow
pip install --no-cache-dir -I pillow
```
(from http://stackoverflow.com/questions/8915296)