[wip] switch to oauthlib from python-oauth2

lower-level implementation, but more robust and gives us more control
This commit is contained in:
Min RK
2018-09-04 15:10:58 +02:00
parent f5a3b1bc5a
commit f84c73eb15
6 changed files with 636 additions and 191 deletions

View File

@@ -513,6 +513,7 @@ class OAuthCode(Base):
expires_at = Column(Integer)
redirect_uri = Column(Unicode(1023))
session_id = Column(Unicode(255))
# state = Column(Unicode(1023))
user_id = Column(Integer, ForeignKey('users.id', ondelete='CASCADE'))
@@ -524,6 +525,10 @@ class OAuthClient(Base):
secret = Column(Unicode(255))
redirect_uri = Column(Unicode(1023))
@property
def client_id(self):
return self.identifier
access_tokens = relationship(
OAuthAccessToken,
backref='client',