I hereby claim:
- I am rdegges on github.
- I am rdegges (https://keybase.io/rdegges) on keybase.
- I have a public key whose fingerprint is 0F3A DC05 17EE DFAD 9F24 3CE0 6B52 9541 D230 3B0C
To claim this, I am signing this object:
var express = require('express'); | |
app.use(function(req, res, next) { | |
if (req.url === '/login') { | |
req.app.set('views', __dirname + '/views'); | |
req.app.set('view engine', 'jade'); | |
res.render('login'); | |
} | |
next(); | |
}); |
var app = require('express')(); | |
var stormpath = require('express-stormpath'); | |
// example 1 - auth by middleware | |
app.use(stormpath({ | |
'/', true, // enforce login | |
})); | |
app.get('/', function(req, res) { | |
res.send('im authenticated!'); |
from json import dumps | |
from os import environ | |
from stormpath.client import Client | |
APPLICATION_NAME = 'test' | |
client = Client( |
""" | |
app.py | |
~~~~~~ | |
A simple Flask-Stormpath app. | |
""" | |
from os.path import expanduser |
/* | |
* quickstart.js | |
* ~~~~~~~~~~~~~ | |
* | |
* Code from the Stormpath Node.js Quickstart: | |
* http://docs.stormpath.com/nodejs/quickstart/ | |
* | |
* You can run this code by typing: | |
* | |
* $ node quickstart.js |
""" | |
quickstart.py | |
~~~~~~~~~~~~~ | |
Code from the Stormpath Python Quickstart: | |
http://docs.stormpath.com/python/quickstart/ | |
You can run this code by typing: | |
$ python quickstart.py |
I hereby claim:
To claim this, I am signing this object:
@app.route('/register', methods=['GET', 'POST']) | |
def register(): | |
""" | |
This view allows a user to register for the site. | |
""" | |
if request.method == 'GET': | |
return render_template('register.html') | |
try: | |
user = User( |
rdegges | omgmypass | |
---|---|---|
rocketspaceadmin | abc123 | |
liljohn | OKKAAAYYYY! |
""" | |
stormpath-seed.py | |
~~~~~~~~~~~~~~~~~ | |
A simple utility which creates a new Stormpath application named 'test' (or | |
uses one already named 'test', if it exists), and creates a number of user | |
accounts in this application. | |
This is useful for various testing scenarios. |