Comments (1)
I just spent 2 days trying to get this to work and it was a bit of a pain. You are correct in that flask.ext.whatever has been deprecated. You should use flask_sentinel instead. Then next error is due to a change in the requests-oauthlib package. Lastly if you want to use mongodb you have to downgrade that as well. You also need a redis version < 3 otherwise you will get a 500 error when trying to get a bearer token. Do the following and you'll be able to run it.
pip install requests-oauthlib==1.1.0 flask-pymongo==0.5.2 redis==2.10.6
Adjust your config line:
app.config.from_object('settings.Config')
Add a settings.py file with your settings:
class Config(object):
SENTINEL_MONGO_DBNAME = "REST"
SENTINEL_MANAGEMENT_USERNAME = "user"
SENTINEL_MANAGEMENT_PASSWORD = "password"
SENTINEL_MONGO_HOST = "127.0.0.1"
SENTINEL_MONGO_PORT = "27017"
SENTINEL_MONGO_URI = "mongodb://rest:[email protected]:27017/REST"
and off you go.
from flask-sentinel.
Related Issues (20)
- How to validate user data by cerberus?
- Error while trying to generate a new token :: 'bytes' object has no attribute 'encode' HOT 2
- Pypi package not updated (0.0.5 vs 0.0.6) HOT 2
- pip install breaks pip / fails HOT 1
- user hash encoding with python 3 HOT 4
- how to refresh token? HOT 5
- invalid_grant
- Problem with flask config
- 500 Internal Server Error for "oauth/management"
- Authorization not working HOT 1
- No check for duplicate username
- Project Requires MongoDB, Doesn't provide other DB support.
- How can I generate client token using post api?
- ResourceOwnerPasswordCredentials(app) fails with Unknown option config_prefix error HOT 3
- Linking client_id to a specific endpoint
- 500 Error on correct username and password.
- Breaking changes with werkzeug==1.0.0 HOT 3
- Switch to authlib HOT 1
- v0.0.7 'save_token' is not handling 'access_token' typecasting according to how redis wants it HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-sentinel.