Git Product home page Git Product logo

xorgauth-fork's Introduction

xorgauth

image

Latest Version

Supported Python versions

Wheel status

License

xorgauth handles authentication / authorization for Polytechnique.org-related services.

Note

This is currently a work in progress.

Features (planned)

  • Login with any alumni email address
  • OpenID Connect v1.0 provider
  • Legacy auth-groupe-x authentication provider
  • Multiple authentication levels (cookie, password, two-factor)

Configuring a development environment

Run the following commands in order to setup a development environment on a local computer:

make update
make createdb
make
python manage.py createsuperuser --fullname me --hrid me --preferred_name me --main_email [email protected]
python manage.py importaccounts scripts/dev_data.json
python manage.py importauthgroupex scripts/dev_data.json
python manage.py runserver
# Go to http://127.0.0.1:8000/admin/ to configure django-oidc-provider

In such a development environment, in order to use the test relying party:

  • run python manage.py shell and add a client:

    from oidc_provider.models import Client, ResponseType
    c = Client(name='Test RP', client_id='123456', redirect_uris=['http://localhost:8000/test-relying-party/','http://127.0.0.1:8000/test-relying-party/'])
    c.save()
    c.response_types.add(ResponseType.objects.get(value='id_token token'))
  • run python manage.py runserver 8000
  • open http://localhost:8000/test-relying-party/ in a web browser and click on the log in button

Configuring a production environment

On Debian, configure a web server (Apache, ngninx, etc.) to serve Django applications (using uwsgi, mod_wsgi, etc.) by reading the documents relevant to these systems. It is a good idea to use a dedicated Python virtual environment.

In order to configure the production application, copy example_settings.ini to local_settings.ini and edit this new file accordingly (DNS hostname, admin email address, database credentials, etc.). It is also possible to use environment variables to give some settings to the Django application (thanks to getconf). It is then possible to initialize the database with:

make createdb

Here are instructions specific to xorgauth application for upgrading:

make update
python manage.py migrate
python manage.py collectstatic
# Recompile the translation files
make

Notes

xorgauth-fork's People

Contributors

ekleog avatar elinorbgr avatar fishilico avatar rbarrois avatar tizot avatar vberger avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.