Skip to main content

Utility to parse and verify Islykill authentication, using SAML 2.0

Project description

islykill2
========
Utility to parse and verify Islykill authentication, using SAML 2.0

Requirements
==============

`signxml <https://github.com/kislyuk/signxml>`_

Installation
==============

:code:`pip install islykill2`

Add islykill2 to your INSTALLED_APPS if using django.

Usage
==============

Example in django

from django.contrib.auth import login
from django.http import HttpResponseRedirect
from islykill2 import AuthenticationError, parse_saml

try:
response = parse_saml(
request.POST['token'],
ip
)
username = get_username_by_kt(response.kt)
user = User.objects.get(username=username)
backend = 'django.contrib.auth.backends.ModelBackend'
user.backend = backend
login(request, user)
return HttpResponseRedirect('/home')
except AuthenticationError:
return HttpResponse(401)

Testing
=========

Please write some

Project details


Download files

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

Source Distribution

Islykill2-1.0.1rc0.tar.gz (8.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page