Add support for /.well-known/keybase.txt

This commit is contained in:
Danielle McLean 2017-10-24 14:39:16 +11:00
parent aa132c6aed
commit 2db2f4b6fc
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
7 changed files with 79 additions and 0 deletions

View file

@ -68,6 +68,7 @@ INSTALLED_APPS = [
'lemoncurry',
'home',
'users',
'wellknowns',
]
MIDDLEWARE = [

View file

@ -18,5 +18,6 @@ from django.contrib import admin
urlpatterns = [
url(r'^', include('home.urls')),
url(r'^.well-known/', include('wellknowns.urls')),
url(r'^admin/', admin.site.urls),
]

1
wellknowns/__init__.py Normal file
View file

@ -0,0 +1 @@
default_app_config = 'wellknowns.apps.WellKnownsConfig'

5
wellknowns/apps.py Normal file
View file

@ -0,0 +1,5 @@
from django.apps import AppConfig
class WellKnownsConfig(AppConfig):
name = 'wellknowns'

View file

@ -0,0 +1,54 @@
==================================================================
https://keybase.io/00dani
--------------------------------------------------------------------
I hereby claim:
* I am an admin of https://00dani.me
* I am 00dani (https://keybase.io/00dani) on keybase.
* I have a public key ASC87RGG0JA9ofKNB8AJMIT7gfEHAosltGkVw9hFpQzXkwo
To do so, I am signing this object:
{
"body": {
"key": {
"eldest_kid": "0120bced1186d0903da1f28d07c0093084fb81f107028b25b46915c3d845a50cd7930a",
"host": "keybase.io",
"kid": "0120bced1186d0903da1f28d07c0093084fb81f107028b25b46915c3d845a50cd7930a",
"uid": "fe1e0c96654603c5880b3f571c862919",
"username": "00dani"
},
"service": {
"hostname": "00dani.me",
"protocol": "https:"
},
"type": "web_service_binding",
"version": 1
},
"client": {
"name": "keybase.io go client",
"version": "1.0.18"
},
"ctime": 1486502471,
"expire_in": 504576000,
"merkle_root": {
"ctime": 1486502388,
"hash": "7fbc86be65b5e09c41f90a2a986c22c6cba0bec0adc73b3cde38a7f4f53ceb4719fbbad968e65cd77aedd74598fc9f75cec52e5dc337feb35b3359f3ea6a9f0d",
"seqno": 840853
},
"prev": "247226586c012bd704ba62b97e97dc2113604b4e84eb9784ad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DEyYmQ3MDRiYTYyYjk3ZTk3ZGMyMTEzNjA0YjRlODRlYjk3ODRhZDg4Njg4N2M5Y2E2ZTdlIiwic2Vxbm8iOjMzLCJ0YWciOiJzaWduYXR1cmUifaNzaWfEQLHcXK1/BmBNEcwKl8sw2RIShjZkL15+rqNbHd4RXb6OjAAvoug0pCZWFU2NoG8chttm+U6WW3mADOwHGy5HqwCoc2lnX3R5cGUgpGhhc2iCpHR5cGUIpXZhbHVlxCAovpeXiCcQcquE0p+VhDOjdJpxwKlVWElcn4oSMliIDKN0YWfNAgKndmVyc2lvbgE=
And finally, I am proving ownership of this host by posting or
appending to this document.
View my publicly-auditable identity here: https://keybase.io/00dani
==================================================================

8
wellknowns/urls.py Normal file
View file

@ -0,0 +1,8 @@
from django.conf.urls import url
from . import views
app_name = 'wellknowns'
urlpatterns = [
url(r'^keybase.txt$', views.keybase, name='keybase'),
]

9
wellknowns/views.py Normal file
View file

@ -0,0 +1,9 @@
from django.views.generic.base import RedirectView
from django.contrib.staticfiles.templatetags.staticfiles import static
def redirect_to_static(file):
return RedirectView.as_view(url=static('wellknowns/' + file))
keybase = redirect_to_static('keybase.txt')