Skip to content

Instantly share code, notes, and snippets.

View Hornswoggles's full-sized avatar

Ray Thompson Hornswoggles

View GitHub Profile
@Hornswoggles
Hornswoggles / mini.py
Created May 17, 2017 03:15
Mini web service with optional cert and jwt authentication and authorization
"""
This is a webservice that is implemented as a standalone twisted plugin.
All of the classes here could be separated out into distinct files but for
this example I find it easier to read if it's all together.
- Validates client certificate's
- Implements Twisted Cred to Authenticate Requests using JSON Web Tokens
TODO:
Create the Avatar Resource class that will perform authorization against our ACL