Skip to content

Instantly share code, notes, and snippets.

View AlexKulikov's full-sized avatar

Alex AlexKulikov

View GitHub Profile
@roosmaa
roosmaa / jwt.py
Created May 5, 2012 17:37
Simple JWT (JSON Web Token) generator for Google OAuth 2.0 service (Server to Server) authentication
import base64
import time
import OpenSSL
from django.utils import simplejson
def _json_dumps(obj):
return simplejson.dumps(obj, separators=(',', ':'))
def _base64url(data):