Skip to main content

In projects that use djangosaml2 in production environment it is usefull to have a mockup authentication system that can be used in development and testing environments i.e. when DEBUG = True.

Install

pip install mockdjangosaml2

Usage

  • in project’s settings.py:

    if DEBUG:
        INSTALLED_APPS += ('mockdjangosaml2',)
    else:
        INSTALLED_APPS += ('djangosaml2',)
  • update project’s urls.py file to include separate set of patterns for DEBUG = True case:

    if settings.DEBUG:
        urlpatterns += patterns('',
            (r'^saml2/', include('mockdjangosaml2.urls')),
        )
    else:
        urlpatterns += patterns('',
            (r'^saml2/', include('djangosaml2.urls')),
        )
  • add mock users and their attributes to MOCK_SAML2_USERS in settings.py. It should be formated as sample given in applications settings.py file.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mockdjangosaml2-0.10.2.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mockdjangosaml2-0.10.2-py2-none-any.whl (16.8 kB view details)

Uploaded Python 2

File details

Details for the file mockdjangosaml2-0.10.2.tar.gz.

File metadata

File hashes

Hashes for mockdjangosaml2-0.10.2.tar.gz
Algorithm Hash digest
SHA256 5627f0296b261eb8ed7b4a2422802e1acce5376001f970dfd1e402120b843e75
MD5 ca0cad1e593a38c997683cc403ac4c35
BLAKE2b-256 a96f9a60cf58e223c57285bfd46296c9f2e354387d040c1d41e0f9c1ca5b7358

See more details on using hashes here.

File details

Details for the file mockdjangosaml2-0.10.2-py2-none-any.whl.

File metadata

File hashes

Hashes for mockdjangosaml2-0.10.2-py2-none-any.whl
Algorithm Hash digest
SHA256 1f8a8a312ac8f6bd914b3be3cb6e760de8a3db31c005fe23e5d5d04d09eff640
MD5 2cbb4dc6325e4c549d0270a052a05d1d
BLAKE2b-256 af44b0f78c606f86d20f85a825b2b8a244ad42fba281e6c4280bda1a80d9a2fb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.16.1

2 files

0.16.0

2 files

0.10.3

1 file

This release

0.10.2 This release

2 files

0.10.1

1 file

0.10.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page