This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Josue Kouka 8cef28bcb3 handle form_submit_element key in login info (#9477)
handle form_submit_elt key in login info (#9477)
2016-01-05 17:47:28 +01:00
debian debian packaging improved, redirect loop fixed, vincenens js/css updated 2015-12-17 18:37:08 +01:00
mandayejs handle form_submit_element key in login info (#9477) 2016-01-05 17:47:28 +01:00
.gitignore handle association failure (#9415) 2015-12-24 11:20:51 +01:00
COPYING add license file 2015-03-22 12:10:03 +01:00
MANIFEST.in debian packaging improved, redirect loop fixed, vincenens js/css updated 2015-12-17 18:37:08 +01:00
README handle form_submit_element key in login info (#9477) 2016-01-05 17:47:28 +01:00
manage.py django-admin startproject mandayejs 2015-03-22 12:09:37 +01:00
requirements_dev.txt FormFactory Class added 2015-12-09 15:03:52 +01:00
setup.py setup.py added 2015-12-09 17:51:27 +01:00

README

MandayeJS
=========


Apache Configuration
--------------------

  <VirtualHost _default_:443>
    ServerAdmin webmaster@localhost
    ServerName dev.entrouvert.org.127.0.0.1.xip.io
    DocumentRoot /var/www/
    SSLEngine On
    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

    CustomLog /var/log/apache2/mandayejs-access.log combined
    ErrorLog /var/log/apache2/mandayejs-error.log

    SSLProxyEngine on
    ProxyPreserveHost On
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off

    ProxyPass /_mandaye/ http://localhost:8000/_mandaye/
    ProxyPassReverse /_mandaye/ http://localhost:8000/_mandaye/

    RequestHeader unset Accept-Encoding
    ProxyPass /_mandaye !
    ProxyPass / https://dev.entrouvert.org/
    ProxyPassReverse / https://dev.entrouvert.org/

    ExtFilterDefine fixtext mode=output intype=text/html \
       cmd="/bin/sed -e '\$a<script type=\"text/javascript\" src=\"/_mandaye/static/mandaye.js\"></script>'"

    <Location />
      SetOutputFilter fixtext
    </Location>
    <Location /_mandaye>
      SetOutputFilter None
    </Location>

  </VirtualHost>

Example of local_settings.py
----------------------------

    SITE_DOMAIN =  'example.com'
    SITE_LOGIN_PATH = '/'
    SITE_CA_URL = 'https://myidp/account/' # Citizen account
    
    SITE_LOCATORS = [
        {
            'id': '#username',    
            'label': 'Username',
            'name': 'username',
            'kind': 'string',
            'required': True,
            'help': '',
        },
        {
            'id': '#birth_date',
            'label': 'Birth date',
            'name': 'birth_date',
            'kind': 'date',
            'required': True,
            'help': 'exemple 16/06/2008'
        },
        {
            'id': '#password',
            'label': 'Password',
            'name': 'password',
            'kind': 'password',
            'required': True,
            'help': ''
        },
    ]

    # 
    SITE_STATIC_ROOT = 'example/mediatheque/'

    # List of javascript scripts running on every pages 
    # loaded in panel.html
    SITE_SCRIPTS = [
        'js/example.com.js',
    ]

    # JS Script asserting authentication through phantomjs
    # The authentication assertion function must be into 
    # a var such as :
    #
    # window.auth_success = function(){
    #       // your code 
    #    }
    #   
    SITE_AUTH_CHECKER = 'js/example.auth.checker.js'

    # JS/CSS for the association page (/_mandaye/associate)
    SITE_ASSOCIATE_STATIC = {
        'css': 'css/example_associate.css',
        'js': 'js/example_associate.js',
    }

    # DOM Element used to validate the logon form
    # If not provided, default is 'input[type=submit], button'
    SITE_FORM_SUBMIT_ELEMENT = 'button[type=submit]' 
    
    # Mellon Settings
    MELLON_IDENTITY_PROVIDERS = [
        {
            'METADATA_URL': 'https://authentic.example.dev.entrouvert.org/idp/saml2/metadata'
        }
    ]
    
    MELLON_VERIFY_SSL_CERTIFICATE = False