Skip to main content

In projects that use djangosaml2 in production environment it is useful 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

mockdjangosaml2-0.10.3-py2-none-any.whl (16.0 kB view details)

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for mockdjangosaml2-0.10.3-py2-none-any.whl
Algorithm Hash digest
SHA256 00704795a24212e518452dceb875be53adfd8204553a71c4d9d6f27d1470e481
MD5 b8adb16f78a08375d481363e4e2a97dd
BLAKE2b-256 464377fd1914def5adc226003506a0e147e1b4f4483e0632108bc937801e6727

See more details on using hashes here.

Release history Release notifications | RSS feed

0.16.1

2 files

0.16.0

2 files

This release

0.10.3 This release

1 file

0.10.2

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