Remove the KoboUserKey-based Authentication.
Instead, the user generates the api_endpoint url to set on their device by visiting http://.../kobo_auth/generate_auth_token. The generated url will contain a RemoteAuthorizationToken that will be included on all subsequent requests from the device to the kobo/ endpoints. (In contrast, the device is authenticated using a session cookie on requests to the download endpoint). Also use Flask.url_for to generate download urls.
This commit is contained in:
2
cps.py
2
cps.py
@@ -42,6 +42,7 @@ from cps.admin import admi
|
||||
from cps.gdrive import gdrive
|
||||
from cps.editbooks import editbook
|
||||
from cps.kobo import kobo
|
||||
from cps.kobo_auth import kobo_auth
|
||||
|
||||
try:
|
||||
from cps.oauth_bb import oauth
|
||||
@@ -61,6 +62,7 @@ def main():
|
||||
app.register_blueprint(gdrive)
|
||||
app.register_blueprint(editbook)
|
||||
app.register_blueprint(kobo)
|
||||
app.register_blueprint(kobo_auth)
|
||||
if oauth_available:
|
||||
app.register_blueprint(oauth)
|
||||
success = web_server.start()
|
||||
|
||||
Reference in New Issue
Block a user