Fix needed import
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import time
|
||||
import datetime
|
||||
import requests
|
||||
from flask import current_app
|
||||
|
||||
class WebexManager:
|
||||
def __init__(self, db_collection, client_id, client_secret, redirect_uri, team_id, user_id):
|
||||
|
||||
@@ -68,19 +68,6 @@ webex_manager = WebexManager(
|
||||
# OAuth Routes
|
||||
# ---------------------------------------------------------
|
||||
|
||||
@app.route("/oauth/login")
|
||||
def oauth_login():
|
||||
"""Redirects developer/admin to Webex for initial OAuth authorization."""
|
||||
scopes = "spark:rooms_write spark:rooms_read spark:memberships_write spark:memberships_read spark:messages_write"
|
||||
params = {
|
||||
"client_id": WEBEX_CLIENT_ID,
|
||||
"response_type": "code",
|
||||
"redirect_uri": WEBEX_REDIRECT_URI,
|
||||
"scope": scopes
|
||||
}
|
||||
url = f"https://webexapis.com/v1/authorize?{urllib.parse.urlencode(params)}"
|
||||
return redirect(url)
|
||||
|
||||
@app.route("/oauth/callback")
|
||||
def oauth_callback():
|
||||
"""OAuth redirect endpoint that receives the authorization code."""
|
||||
|
||||
Reference in New Issue
Block a user