File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 4
4
from flask .ext .sqlalchemy import SQLAlchemy
5
5
from sqlalchemy .orm import relationship
6
6
from flask_oauthlib .provider import OAuth2Provider
7
- from flask_oauthlib .contrib .bindings import (
8
- SQLAlchemyBinding ,
9
- GrantCacheBinding
10
- )
7
+ from flask_oauthlib .contrib .oauth2 import SQLAlchemyBinding
8
+ from flask_oauthlib .contrib .oauth2 import grant_cache_binding
11
9
12
10
13
11
db = SQLAlchemy ()
@@ -124,9 +122,8 @@ def cache_provider(app):
124
122
SQLAlchemyBinding (oauth , db .session , user = User ,
125
123
token = Token , client = Client )
126
124
127
- GrantCacheBinding (app , oauth , current_user ,
128
- config = {'OAUTH2_CACHE_TYPE' : 'simple' })
129
-
125
+ app .config .update ({'OAUTH2_CACHE_TYPE' : 'simple' })
126
+ grant_cache_binding (app , oauth , current_user )
130
127
return oauth
131
128
132
129
You can’t perform that action at this time.
0 commit comments