diff --git a/flask_example/app.py b/flask_example/app.py index 3e32b8d..89d5d52 100644 --- a/flask_example/app.py +++ b/flask_example/app.py @@ -15,7 +15,24 @@ app = Flask(__name__) app.config.from_pyfile('config.py') -oauth = OAuth(app) + + +class Cache(object): + def __init__(self): + self._data = {} + + def get(self, k): + return self._data.get(k) + + def set(self, k, v, timeout=None): + self._data[k] = v + + def delete(self, k): + if k in self._data: + del self._data[k] + + +oauth = OAuth(app, Cache()) @app.route('/')