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.1.zip (17.1 kB view details)

Uploaded Source

File details

Details for the file mockdjangosaml2-0.10.1.zip.

File metadata

  • Download URL: mockdjangosaml2-0.10.1.zip
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mockdjangosaml2-0.10.1.zip
Algorithm Hash digest
SHA256 dd70b7fa880d8e181c0a7cf7c71fd47bb0436ddc122faa19345200db8d4d8b4a
MD5 2581bfa4b4953bfaa944380d4b802f6b
BLAKE2b-256 0d82d5ae80ceb9516a203cd666b42953895aad1c672b686af08d146767384007

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

0.10.2

2 files

This release

0.10.1 This release

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