Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Django-radius

DZone's Guide to

Django-radius

· Web Dev Zone
Free Resource

Never build auth again! Okta makes it simple to implement authentication, authorization, MFA and more in minutes. Try the free developer API today! 

I’ve been working on a little Django app for a while now, which solves a problem I often come across in Django projects. django-radius allows a developer to use a 3rd party RADIUS server to provide authentication in their Django application. Not only this, though, it also allows the use of multiple RADIUS servers, which can be specified in whichever way makes sense.

This might sound a little contrived, so I’ll give an example. Imagine a web service, such as a helpdesk management system, whose users are organised into groups. Each user belongs to an organisation, which buys into the service on their behalf. Basecamp and Zendesk operate this model, to name just two. To login, a user must visit a particular URL - so that the system may determine which organisation that user belongs to (http://yourcompany.zendesk.com for example).

Now imagine that this service wishes to provide external authentication to its customer’s systems, using RADIUS. This means that there’s no need for users to have yet another password on yet another system, and is generally a Good Thing™.

In this scenario, the developers would have to find some way of validating the user’s credentials using the correct RADIUS server, based on the URL they used to access the site with. For this type of problem, django-radius is the perfect solution.

This is my first real attempt at doing things properly in a Django app, and quite some effort has gone into documenting both the usage and the code. I’ll leave it to those that are interested enough to read the README and find out how it works.

Hopefully this app will save a little time in someone else’s project, and I’d love to hear from anyone with comments or suggestions on how it can be improved.

Launch your application faster with Okta’s user management API. Register today for the free forever developer edition!

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}