Permalink
Browse files

Create provider.

  • Loading branch information...
lepture committed Nov 21, 2013
1 parent 3f1c8f2 commit 3b60b5d769b807b1549157f76cd46151dd3b8f1d
Showing with 6 additions and 0 deletions.
  1. +6 −0 app.py
View
6 app.py
@@ -5,6 +5,7 @@
from flask import render_template, redirect, jsonify
from flask_sqlalchemy import SQLAlchemy
from werkzeug.security import gen_salt
from flask_oauthlib.provider import OAuth2Provider
app = Flask(__name__, template_folder='templates')
@@ -14,6 +15,7 @@
'SQLALCHEMY_DATABASE_URI': 'sqlite:///db.sqlite',
})
db = SQLAlchemy(app)
oauth = OAuth2Provider(app)
class User(db.Model):
@@ -94,6 +96,10 @@ def client():
)
@oauth.clientgetter
def load_client(client_id):
return Client.query.filter_by(client_id=client_id).first()
if __name__ == '__main__':
db.create_all()
app.run()

0 comments on commit 3b60b5d

Please sign in to comment.